<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE ViewPatterns #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE TupleSections #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE OverloadedStrings #-}</span><span>
</span><span id="line-5"></span><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE DeriveFunctor #-}</span><span>
</span><span id="line-7"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Iface.Ext.Utils</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Map.html"><span class="hs-identifier">GHC.Core.Map</span></a></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier">DynFlags</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier">FastString</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#mkFastString"><span class="hs-identifier">mkFastString</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Type.html"><span class="hs-identifier">GHC.Iface.Type</span></a></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Multiplicity.html"><span class="hs-identifier">GHC.Core.Multiplicity</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.Occurrence.html#varName"><span class="hs-identifier">varName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html"><span class="hs-identifier">GHC.Types.Name.Set</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator">(&lt;&gt;)</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">O</span></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html"><span class="hs-identifier">GHC.Types.SrcLoc</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CoreToIface.html"><span class="hs-identifier">GHC.CoreToIface</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html"><span class="hs-identifier">GHC.Core.TyCo.Rep</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html"><span class="hs-identifier">GHC.Types.Var.Env</span></a></span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html"><span class="hs-identifier">GHC.Iface.Ext.Types</span></a></span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">M</span></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Set.html#"><span class="hs-identifier">Data.Set</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">S</span></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.IntMap.Strict.html#"><span class="hs-identifier">Data.IntMap.Strict</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">IM</span></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../array/src/Data.Array.html#"><span class="hs-identifier">Data.Array</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">A</span></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span>                  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.html#typeOf"><span class="hs-identifier">typeOf</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.html#typeRepTyCon"><span class="hs-identifier">typeRepTyCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier">Data</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Data.html#toConstr"><span class="hs-identifier">toConstr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>                 </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier">maybeToList</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#mapMaybe"><span class="hs-identifier">mapMaybe</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Monoid.html#"><span class="hs-identifier">Data.Monoid</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>                  </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier">find</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#"><span class="hs-identifier">Data.Traversable</span></a></span><span>           </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#for"><span class="hs-identifier">for</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Coerce.html#"><span class="hs-identifier">Data.Coerce</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#"><span class="hs-identifier">Control.Monad.Trans.State.Strict</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#get"><span class="hs-identifier">get</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#"><span class="hs-identifier">Control.Monad.Trans.Reader</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Tree.html#"><span class="hs-identifier">Data.Tree</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Tree</span></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-keyword">type</span><span> </span><span id="RefMap"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#RefMap"><span class="hs-identifier hs-var">RefMap</span></a></span></span><span> </span><span id="local-6989586621680999714"><span class="annot"><a href="#local-6989586621680999714"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">M.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Identifier"><span class="hs-identifier hs-type">Identifier</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#IdentifierDetails"><span class="hs-identifier hs-type">IdentifierDetails</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999714"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span id="local-6989586621681000052"><span id="local-6989586621681000053"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#generateReferencesMap"><span class="hs-identifier hs-type">generateReferencesMap</span></a></span><span>
</span><span id="line-47"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#Foldable"><span class="hs-identifier hs-type">Foldable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681000053"><span class="hs-identifier hs-type">f</span></a></span><span>
</span><span id="line-48"></span><span>  </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681000053"><span class="hs-identifier hs-type">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681000052"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#RefMap"><span class="hs-identifier hs-type">RefMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681000052"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-50"></span><span id="generateReferencesMap"><span class="annot"><span class="annottext">generateReferencesMap :: forall (f :: * -&gt; *) a. Foldable f =&gt; f (HieAST a) -&gt; RefMap a
</span><a href="GHC.Iface.Ext.Utils.html#generateReferencesMap"><span class="hs-identifier hs-var hs-var">generateReferencesMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HieAST a
 -&gt; Map Identifier [(Span, IdentifierDetails a)]
 -&gt; Map Identifier [(Span, IdentifierDetails a)])
-&gt; Map Identifier [(Span, IdentifierDetails a)]
-&gt; f (HieAST a)
-&gt; Map Identifier [(Span, IdentifierDetails a)]
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680999708"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999708"><span class="hs-identifier hs-var">ast</span></a></span></span><span> </span><span id="local-6989586621680999707"><span class="annot"><span class="annottext">Map Identifier [(Span, IdentifierDetails a)]
</span><a href="#local-6989586621680999707"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">([(Span, IdentifierDetails a)]
 -&gt; [(Span, IdentifierDetails a)] -&gt; [(Span, IdentifierDetails a)])
-&gt; Map Identifier [(Span, IdentifierDetails a)]
-&gt; Map Identifier [(Span, IdentifierDetails a)]
-&gt; Map Identifier [(Span, IdentifierDetails a)]
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; Map k a -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#unionWith"><span class="hs-identifier hs-var">M.unionWith</span></a></span><span> </span><span class="annot"><span class="annottext">[(Span, IdentifierDetails a)]
-&gt; [(Span, IdentifierDetails a)] -&gt; [(Span, IdentifierDetails a)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">(++)</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieAST a -&gt; Map Identifier [(Span, IdentifierDetails a)]
forall {a}.
HieAST a -&gt; Map Identifier [(Span, IdentifierDetails a)]
</span><a href="#local-6989586621680999705"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999708"><span class="hs-identifier hs-var">ast</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Map Identifier [(Span, IdentifierDetails a)]
</span><a href="#local-6989586621680999707"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Map Identifier [(Span, IdentifierDetails a)]
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span>
</span><span id="line-51"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-52"></span><span>    </span><span id="local-6989586621680999705"><span class="annot"><span class="annottext">go :: HieAST a -&gt; Map Identifier [(Span, IdentifierDetails a)]
</span><a href="#local-6989586621680999705"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621680999699"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999699"><span class="hs-identifier hs-var">ast</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([(Span, IdentifierDetails a)]
 -&gt; [(Span, IdentifierDetails a)] -&gt; [(Span, IdentifierDetails a)])
-&gt; [Map Identifier [(Span, IdentifierDetails a)]]
-&gt; Map Identifier [(Span, IdentifierDetails a)]
forall (f :: * -&gt; *) k a.
(Foldable f, Ord k) =&gt;
(a -&gt; a -&gt; a) -&gt; f (Map k a) -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#unionsWith"><span class="hs-identifier hs-var">M.unionsWith</span></a></span><span> </span><span class="annot"><span class="annottext">[(Span, IdentifierDetails a)]
-&gt; [(Span, IdentifierDetails a)] -&gt; [(Span, IdentifierDetails a)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">(++)</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map Identifier [(Span, IdentifierDetails a)]
</span><a href="#local-6989586621680999697"><span class="hs-identifier hs-var">this</span></a></span><span> </span><span class="annot"><span class="annottext">Map Identifier [(Span, IdentifierDetails a)]
-&gt; [Map Identifier [(Span, IdentifierDetails a)]]
-&gt; [Map Identifier [(Span, IdentifierDetails a)]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">(HieAST a -&gt; Map Identifier [(Span, IdentifierDetails a)])
-&gt; [HieAST a] -&gt; [Map Identifier [(Span, IdentifierDetails a)]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Map Identifier [(Span, IdentifierDetails a)]
</span><a href="#local-6989586621680999705"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieAST a -&gt; [HieAST a]
forall a. HieAST a -&gt; [HieAST a]
</span><a href="GHC.Iface.Ext.Types.html#nodeChildren"><span class="hs-identifier hs-var hs-var">nodeChildren</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999699"><span class="hs-identifier hs-var">ast</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-54"></span><span>        </span><span id="local-6989586621680999697"><span class="annot"><span class="annottext">this :: Map Identifier [(Span, IdentifierDetails a)]
</span><a href="#local-6989586621680999697"><span class="hs-identifier hs-var hs-var">this</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdentifierDetails a -&gt; [(Span, IdentifierDetails a)])
-&gt; Map Identifier (IdentifierDetails a)
-&gt; Map Identifier [(Span, IdentifierDetails a)]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Span, IdentifierDetails a) -&gt; [(Span, IdentifierDetails a)]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">((Span, IdentifierDetails a) -&gt; [(Span, IdentifierDetails a)])
-&gt; (IdentifierDetails a -&gt; (Span, IdentifierDetails a))
-&gt; IdentifierDetails a
-&gt; [(Span, IdentifierDetails a)]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieAST a -&gt; Span
forall a. HieAST a -&gt; Span
</span><a href="GHC.Iface.Ext.Types.html#nodeSpan"><span class="hs-identifier hs-var hs-var">nodeSpan</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999699"><span class="hs-identifier hs-var">ast</span></a></span><span class="hs-special">,</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Map Identifier (IdentifierDetails a)
 -&gt; Map Identifier [(Span, IdentifierDetails a)])
-&gt; Map Identifier (IdentifierDetails a)
-&gt; Map Identifier [(Span, IdentifierDetails a)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo a -&gt; Map Identifier (IdentifierDetails a)
forall a. SourcedNodeInfo a -&gt; NodeIdentifiers a
</span><a href="GHC.Iface.Ext.Utils.html#sourcedNodeIdents"><span class="hs-identifier hs-var">sourcedNodeIdents</span></a></span><span> </span><span class="annot"><span class="annottext">(SourcedNodeInfo a -&gt; Map Identifier (IdentifierDetails a))
-&gt; SourcedNodeInfo a -&gt; Map Identifier (IdentifierDetails a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; SourcedNodeInfo a
forall a. HieAST a -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#sourcedNodeInfo"><span class="hs-identifier hs-var hs-var">sourcedNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999699"><span class="hs-identifier hs-var">ast</span></a></span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#renderHieType"><span class="hs-identifier hs-type">renderHieType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieTypeFix"><span class="hs-identifier hs-type">HieTypeFix</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-57"></span><span id="renderHieType"><span class="annot"><span class="annottext">renderHieType :: DynFlags -&gt; HieTypeFix -&gt; String
</span><a href="GHC.Iface.Ext.Utils.html#renderHieType"><span class="hs-identifier hs-var hs-var">renderHieType</span></a></span></span><span> </span><span id="local-6989586621680999687"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680999687"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621680999686"><span class="annot"><span class="annottext">HieTypeFix
</span><a href="#local-6989586621680999686"><span class="hs-identifier hs-var">ht</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDocContext -&gt; SDoc -&gt; String
</span><a href="GHC.Utils.Outputable.html#renderWithStyle"><span class="hs-identifier hs-var">renderWithStyle</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; PprStyle -&gt; SDocContext
</span><a href="GHC.Driver.Session.html#initSDocContext"><span class="hs-identifier hs-var">initSDocContext</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680999687"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">PprStyle
</span><a href="GHC.Utils.Outputable.html#defaultUserStyle"><span class="hs-identifier hs-var">defaultUserStyle</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceType -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">(IfaceType -&gt; SDoc) -&gt; IfaceType -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HieTypeFix -&gt; IfaceType
</span><a href="GHC.Iface.Ext.Utils.html#hieTypeToIface"><span class="hs-identifier hs-var">hieTypeToIface</span></a></span><span> </span><span class="annot"><span class="annottext">HieTypeFix
</span><a href="#local-6989586621680999686"><span class="hs-identifier hs-var">ht</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#resolveVisibility"><span class="hs-identifier hs-type">resolveVisibility</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-60"></span><span id="resolveVisibility"><span class="annot"><span class="annottext">resolveVisibility :: Type -&gt; [Type] -&gt; [(Bool, Type)]
</span><a href="GHC.Iface.Ext.Utils.html#resolveVisibility"><span class="hs-identifier hs-var hs-var">resolveVisibility</span></a></span></span><span> </span><span id="local-6989586621680999679"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999679"><span class="hs-identifier hs-var">kind</span></a></span></span><span> </span><span id="local-6989586621680999678"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999678"><span class="hs-identifier hs-var">ty_args</span></a></span></span><span>
</span><span id="line-61"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; Type -&gt; [Type] -&gt; [(Bool, Type)]
</span><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InScopeSet -&gt; TCvSubst
</span><a href="GHC.Core.TyCo.Subst.html#mkEmptyTCvSubst"><span class="hs-identifier hs-var">mkEmptyTCvSubst</span></a></span><span> </span><span class="annot"><span class="annottext">InScopeSet
</span><a href="#local-6989586621680999675"><span class="hs-identifier hs-var">in_scope</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999679"><span class="hs-identifier hs-var">kind</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999678"><span class="hs-identifier hs-var">ty_args</span></a></span><span>
</span><span id="line-62"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-63"></span><span>    </span><span id="local-6989586621680999675"><span class="annot"><span class="annottext">in_scope :: InScopeSet
</span><a href="#local-6989586621680999675"><span class="hs-identifier hs-var hs-var">in_scope</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VarSet -&gt; InScopeSet
</span><a href="GHC.Types.Var.Env.html#mkInScopeSet"><span class="hs-identifier hs-var">mkInScopeSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Type] -&gt; VarSet
</span><a href="GHC.Core.TyCo.FVs.html#tyCoVarsOfTypes"><span class="hs-identifier hs-var">tyCoVarsOfTypes</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999678"><span class="hs-identifier hs-var">ty_args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span>    </span><span id="local-6989586621680999677"><span class="annot"><span class="annottext">go :: TCvSubst -&gt; Type -&gt; [Type] -&gt; [(Bool, Type)]
</span><a href="#local-6989586621680999677"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><span class="hs-identifier">_</span></span><span>   </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span>                   </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-66"></span><span>    </span><span class="annot"><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680999672"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999672"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680999671"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999671"><span class="hs-identifier hs-var">ty</span></a></span></span><span>                  </span><span id="local-6989586621680999670"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999670"><span class="hs-identifier hs-var">ts</span></a></span></span><span>
</span><span id="line-67"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680999669"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999669"><span class="hs-identifier hs-var">ty'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Maybe Type
</span><a href="GHC.Core.Type.html#coreView"><span class="hs-identifier hs-var">coreView</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999671"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-68"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; Type -&gt; [Type] -&gt; [(Bool, Type)]
</span><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999672"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999669"><span class="hs-identifier hs-var">ty'</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999670"><span class="hs-identifier hs-var">ts</span></a></span><span>
</span><span id="line-69"></span><span>    </span><span class="annot"><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680999667"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999667"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ForAllTy"><span class="hs-identifier hs-type">ForAllTy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-type">Bndr</span></a></span><span> </span><span id="local-6989586621680999664"><span class="annot"><span class="annottext">TyCoVar
</span><a href="#local-6989586621680999664"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621680999663"><span class="annot"><span class="annottext">ArgFlag
</span><a href="#local-6989586621680999663"><span class="hs-identifier hs-var">vis</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680999662"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999662"><span class="hs-identifier hs-var">res</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680999661"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999661"><span class="hs-identifier hs-var">t</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999660"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999660"><span class="hs-identifier hs-var">ts</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-70"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">ArgFlag -&gt; Bool
</span><a href="GHC.Types.Var.html#isVisibleArgFlag"><span class="hs-identifier hs-var">isVisibleArgFlag</span></a></span><span> </span><span class="annot"><span class="annottext">ArgFlag
</span><a href="#local-6989586621680999663"><span class="hs-identifier hs-var">vis</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999661"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Bool, Type) -&gt; [(Bool, Type)] -&gt; [(Bool, Type)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[(Bool, Type)]
</span><a href="#local-6989586621680999658"><span class="hs-identifier hs-var">ts'</span></a></span><span>
</span><span id="line-71"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999661"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Bool, Type) -&gt; [(Bool, Type)] -&gt; [(Bool, Type)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[(Bool, Type)]
</span><a href="#local-6989586621680999658"><span class="hs-identifier hs-var">ts'</span></a></span><span>
</span><span id="line-72"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-73"></span><span>        </span><span id="local-6989586621680999658"><span class="annot"><span class="annottext">ts' :: [(Bool, Type)]
</span><a href="#local-6989586621680999658"><span class="hs-identifier hs-var hs-var">ts'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; Type -&gt; [Type] -&gt; [(Bool, Type)]
</span><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TCvSubst -&gt; TyCoVar -&gt; Type -&gt; TCvSubst
</span><a href="GHC.Core.TyCo.Subst.html#extendTvSubst"><span class="hs-identifier hs-var">extendTvSubst</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999667"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">TyCoVar
</span><a href="#local-6989586621680999664"><span class="hs-identifier hs-var">tv</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999661"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999662"><span class="hs-identifier hs-var">res</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999660"><span class="hs-identifier hs-var">ts</span></a></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span>    </span><span class="annot"><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680999656"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999656"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#FunTy"><span class="hs-identifier hs-type">FunTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ft_res :: Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#ft_res"><span class="hs-identifier hs-var">ft_res</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680999653"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999653"><span class="hs-identifier hs-var">res</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680999652"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999652"><span class="hs-identifier hs-var">t</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999651"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999651"><span class="hs-identifier hs-var">ts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- No type-class args in tycon apps</span><span>
</span><span id="line-76"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999652"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Bool, Type) -&gt; [(Bool, Type)] -&gt; [(Bool, Type)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TCvSubst -&gt; Type -&gt; [Type] -&gt; [(Bool, Type)]
</span><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999656"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999653"><span class="hs-identifier hs-var">res</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999651"><span class="hs-identifier hs-var">ts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span>    </span><span class="annot"><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680999650"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999650"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyVarTy"><span class="hs-identifier hs-type">TyVarTy</span></a></span><span> </span><span id="local-6989586621680999648"><span class="annot"><span class="annottext">TyCoVar
</span><a href="#local-6989586621680999648"><span class="hs-identifier hs-var">tv</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680999647"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999647"><span class="hs-identifier hs-var">ts</span></a></span></span><span>
</span><span id="line-79"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680999646"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999646"><span class="hs-identifier hs-var">ki</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; TyCoVar -&gt; Maybe Type
</span><a href="GHC.Core.TyCo.Subst.html#lookupTyVar"><span class="hs-identifier hs-var">lookupTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999650"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">TyCoVar
</span><a href="#local-6989586621680999648"><span class="hs-identifier hs-var">tv</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TCvSubst -&gt; Type -&gt; [Type] -&gt; [(Bool, Type)]
</span><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999650"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999646"><span class="hs-identifier hs-var">ki</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999647"><span class="hs-identifier hs-var">ts</span></a></span><span>
</span><span id="line-80"></span><span>    </span><span class="annot"><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680999644"><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999644"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621680999643"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999643"><span class="hs-identifier hs-var">kind</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680999642"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999642"><span class="hs-identifier hs-var">t</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999641"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999641"><span class="hs-identifier hs-var">ts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999642"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Bool, Type) -&gt; [(Bool, Type)] -&gt; [(Bool, Type)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TCvSubst -&gt; Type -&gt; [Type] -&gt; [(Bool, Type)]
</span><a href="#local-6989586621680999677"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">TCvSubst
</span><a href="#local-6989586621680999644"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999643"><span class="hs-identifier hs-var">kind</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999641"><span class="hs-identifier hs-var">ts</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Ill-kinded</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span id="local-6989586621681000006"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#foldType"><span class="hs-identifier hs-type">foldType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieType"><span class="hs-identifier hs-type">HieType</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681000006"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681000006"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieTypeFix"><span class="hs-identifier hs-type">HieTypeFix</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681000006"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-83"></span><span id="foldType"><span class="annot"><span class="annottext">foldType :: forall a. (HieType a -&gt; a) -&gt; HieTypeFix -&gt; a
</span><a href="GHC.Iface.Ext.Utils.html#foldType"><span class="hs-identifier hs-var hs-var">foldType</span></a></span></span><span> </span><span id="local-6989586621680999637"><span class="annot"><span class="annottext">HieType a -&gt; a
</span><a href="#local-6989586621680999637"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Roll"><span class="hs-identifier hs-type">Roll</span></a></span><span> </span><span id="local-6989586621680999635"><span class="annot"><span class="annottext">HieType HieTypeFix
</span><a href="#local-6989586621680999635"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieType a -&gt; a
</span><a href="#local-6989586621680999637"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">(HieType a -&gt; a) -&gt; HieType a -&gt; a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(HieTypeFix -&gt; a) -&gt; HieType HieTypeFix -&gt; HieType a
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(HieType a -&gt; a) -&gt; HieTypeFix -&gt; a
forall a. (HieType a -&gt; a) -&gt; HieTypeFix -&gt; a
</span><a href="GHC.Iface.Ext.Utils.html#foldType"><span class="hs-identifier hs-var">foldType</span></a></span><span> </span><span class="annot"><span class="annottext">HieType a -&gt; a
</span><a href="#local-6989586621680999637"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HieType HieTypeFix
</span><a href="#local-6989586621680999635"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#selectPoint"><span class="hs-identifier hs-type">selectPoint</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieFile"><span class="hs-identifier hs-type">HieFile</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-86"></span><span id="selectPoint"><span class="annot"><span class="annottext">selectPoint :: HieFile -&gt; (Int, Int) -&gt; Maybe (HieAST Int)
</span><a href="GHC.Iface.Ext.Utils.html#selectPoint"><span class="hs-identifier hs-var hs-var">selectPoint</span></a></span></span><span> </span><span id="local-6989586621680999633"><span class="annot"><span class="annottext">HieFile
</span><a href="#local-6989586621680999633"><span class="hs-identifier hs-var">hf</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680999632"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999632"><span class="hs-identifier hs-var">sl</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680999631"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999631"><span class="hs-identifier hs-var">sc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">First (HieAST Int) -&gt; Maybe (HieAST Int)
forall a. First a -&gt; Maybe a
</span><a href="../../base/src/Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">(First (HieAST Int) -&gt; Maybe (HieAST Int))
-&gt; First (HieAST Int) -&gt; Maybe (HieAST Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-87"></span><span>  </span><span class="annot"><span class="annottext">(((FastString, HieAST Int) -&gt; First (HieAST Int))
 -&gt; [(FastString, HieAST Int)] -&gt; First (HieAST Int))
-&gt; [(FastString, HieAST Int)]
-&gt; ((FastString, HieAST Int) -&gt; First (HieAST Int))
-&gt; First (HieAST Int)
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">((FastString, HieAST Int) -&gt; First (HieAST Int))
-&gt; [(FastString, HieAST Int)] -&gt; First (HieAST Int)
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map FastString (HieAST Int) -&gt; [(FastString, HieAST Int)]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">M.toList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieASTs Int -&gt; Map FastString (HieAST Int)
forall a. HieASTs a -&gt; Map FastString (HieAST a)
</span><a href="GHC.Iface.Ext.Types.html#getAsts"><span class="hs-identifier hs-var hs-var">getAsts</span></a></span><span> </span><span class="annot"><span class="annottext">(HieASTs Int -&gt; Map FastString (HieAST Int))
-&gt; HieASTs Int -&gt; Map FastString (HieAST Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HieFile -&gt; HieASTs Int
</span><a href="GHC.Iface.Ext.Types.html#hie_asts"><span class="hs-identifier hs-var hs-var">hie_asts</span></a></span><span> </span><span class="annot"><span class="annottext">HieFile
</span><a href="#local-6989586621680999633"><span class="hs-identifier hs-var">hf</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(((FastString, HieAST Int) -&gt; First (HieAST Int))
 -&gt; First (HieAST Int))
-&gt; ((FastString, HieAST Int) -&gt; First (HieAST Int))
-&gt; First (HieAST Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621680999624"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999624"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680999623"><span class="annot"><span class="annottext">HieAST Int
</span><a href="#local-6989586621680999623"><span class="hs-identifier hs-var">ast</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST Int) -&gt; First (HieAST Int)
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (HieAST Int) -&gt; First (HieAST Int))
-&gt; Maybe (HieAST Int) -&gt; First (HieAST Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-88"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Span -&gt; HieAST Int -&gt; Maybe (HieAST Int)
forall a. Span -&gt; HieAST a -&gt; Maybe (HieAST a)
</span><a href="GHC.Iface.Ext.Utils.html#selectSmallestContaining"><span class="hs-identifier hs-var">selectSmallestContaining</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; Span
</span><a href="#local-6989586621680999620"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999624"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HieAST Int
</span><a href="#local-6989586621680999623"><span class="hs-identifier hs-var">ast</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-89"></span><span>        </span><span class="annot"><span class="annottext">Maybe (HieAST Int)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST Int)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-90"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680999619"><span class="annot"><span class="annottext">HieAST Int
</span><a href="#local-6989586621680999619"><span class="hs-identifier hs-var">ast'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HieAST Int -&gt; Maybe (HieAST Int)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Int
</span><a href="#local-6989586621680999619"><span class="hs-identifier hs-var">ast'</span></a></span><span>
</span><span id="line-91"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-92"></span><span>   </span><span id="local-6989586621680999618"><span class="annot"><span class="annottext">sloc :: FastString -&gt; RealSrcLoc
</span><a href="#local-6989586621680999618"><span class="hs-identifier hs-var hs-var">sloc</span></a></span></span><span> </span><span id="local-6989586621680999617"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999617"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; Int -&gt; Int -&gt; RealSrcLoc
</span><a href="GHC.Types.SrcLoc.html#mkRealSrcLoc"><span class="hs-identifier hs-var">mkRealSrcLoc</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999617"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999632"><span class="hs-identifier hs-var">sl</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999631"><span class="hs-identifier hs-var">sc</span></a></span><span>
</span><span id="line-93"></span><span>   </span><span id="local-6989586621680999620"><span class="annot"><span class="annottext">sp :: FastString -&gt; Span
</span><a href="#local-6989586621680999620"><span class="hs-identifier hs-var hs-var">sp</span></a></span></span><span> </span><span id="local-6989586621680999615"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999615"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RealSrcLoc -&gt; RealSrcLoc -&gt; Span
</span><a href="GHC.Types.SrcLoc.html#mkRealSrcSpan"><span class="hs-identifier hs-var">mkRealSrcSpan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; RealSrcLoc
</span><a href="#local-6989586621680999618"><span class="hs-identifier hs-var">sloc</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999615"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; RealSrcLoc
</span><a href="#local-6989586621680999618"><span class="hs-identifier hs-var">sloc</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999615"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span id="local-6989586621680999989"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#findEvidenceUse"><span class="hs-identifier hs-type">findEvidenceUse</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeIdentifiers"><span class="hs-identifier hs-type">NodeIdentifiers</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999989"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-96"></span><span id="findEvidenceUse"><span class="annot"><span class="annottext">findEvidenceUse :: forall a. NodeIdentifiers a -&gt; [Name]
</span><a href="GHC.Iface.Ext.Utils.html#findEvidenceUse"><span class="hs-identifier hs-var hs-var">findEvidenceUse</span></a></span></span><span> </span><span id="local-6989586621680999610"><span class="annot"><span class="annottext">NodeIdentifiers a
</span><a href="#local-6989586621680999610"><span class="hs-identifier hs-var">ni</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999609"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621680999609"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999609"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680999608"><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999608"><span class="hs-identifier hs-var">dets</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(Identifier, IdentifierDetails a)]
</span><a href="#local-6989586621680999607"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(ContextInfo -&gt; Bool) -&gt; Set ContextInfo -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#isEvidenceUse"><span class="hs-identifier hs-var">isEvidenceUse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; Set ContextInfo
forall a. IdentifierDetails a -&gt; Set ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#identInfo"><span class="hs-identifier hs-var hs-var">identInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999608"><span class="hs-identifier hs-var">dets</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-97"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-98"></span><span>   </span><span id="local-6989586621680999607"><span class="annot"><span class="annottext">xs :: [(Identifier, IdentifierDetails a)]
</span><a href="#local-6989586621680999607"><span class="hs-identifier hs-var hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NodeIdentifiers a -&gt; [(Identifier, IdentifierDetails a)]
forall k a. Map k a -&gt; [(k, a)]
</span><a href="../../containers/src/Data.Map.Internal.html#toList"><span class="hs-identifier hs-var">M.toList</span></a></span><span> </span><span class="annot"><span class="annottext">NodeIdentifiers a
</span><a href="#local-6989586621680999610"><span class="hs-identifier hs-var">ni</span></a></span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span class="hs-keyword">data</span><span> </span><span id="EvidenceInfo"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#EvidenceInfo"><span class="hs-identifier hs-var">EvidenceInfo</span></a></span></span><span> </span><span id="local-6989586621680999982"><span class="annot"><a href="#local-6989586621680999982"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-101"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="EvidenceInfo"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#EvidenceInfo"><span class="hs-identifier hs-var">EvidenceInfo</span></a></span></span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-special">{</span><span> </span><span id="evidenceVar"><span class="annot"><span class="annottext">forall a. EvidenceInfo a -&gt; Name
</span><a href="GHC.Iface.Ext.Utils.html#evidenceVar"><span class="hs-identifier hs-var hs-var">evidenceVar</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-103"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="evidenceSpan"><span class="annot"><span class="annottext">forall a. EvidenceInfo a -&gt; Span
</span><a href="GHC.Iface.Ext.Utils.html#evidenceSpan"><span class="hs-identifier hs-var hs-var">evidenceSpan</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="evidenceType"><span class="annot"><span class="annottext">forall a. EvidenceInfo a -&gt; a
</span><a href="GHC.Iface.Ext.Utils.html#evidenceType"><span class="hs-identifier hs-var hs-var">evidenceType</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621680999982"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-105"></span><span>  </span><span class="hs-special">,</span><span> </span><span id="evidenceDetails"><span class="annot"><span class="annottext">forall a. EvidenceInfo a -&gt; Maybe (EvVarSource, Scope, Maybe Span)
</span><a href="GHC.Iface.Ext.Utils.html#evidenceDetails"><span class="hs-identifier hs-var hs-var">evidenceDetails</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#EvVarSource"><span class="hs-identifier hs-type">EvVarSource</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Scope"><span class="hs-identifier hs-type">Scope</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-special">}</span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680999587"><span id="local-6989586621680999596"><span class="annot"><span class="annottext">EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
(EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool)
-&gt; (EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool)
-&gt; Eq (EvidenceInfo a)
forall a. Eq a =&gt; EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
$c/= :: forall a. Eq a =&gt; EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
== :: EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
$c== :: forall a. Eq a =&gt; EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span id="local-6989586621680999549"><span id="local-6989586621680999551"><span id="local-6989586621680999554"><span id="local-6989586621680999557"><span id="local-6989586621680999560"><span id="local-6989586621680999567"><span id="local-6989586621680999576"><span class="annot"><span class="annottext">Eq (EvidenceInfo a)
Eq (EvidenceInfo a)
-&gt; (EvidenceInfo a -&gt; EvidenceInfo a -&gt; Ordering)
-&gt; (EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool)
-&gt; (EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool)
-&gt; (EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool)
-&gt; (EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool)
-&gt; (EvidenceInfo a -&gt; EvidenceInfo a -&gt; EvidenceInfo a)
-&gt; (EvidenceInfo a -&gt; EvidenceInfo a -&gt; EvidenceInfo a)
-&gt; Ord (EvidenceInfo a)
EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
EvidenceInfo a -&gt; EvidenceInfo a -&gt; Ordering
EvidenceInfo a -&gt; EvidenceInfo a -&gt; EvidenceInfo a
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
forall {a}. Ord a =&gt; Eq (EvidenceInfo a)
forall a. Ord a =&gt; EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
forall a. Ord a =&gt; EvidenceInfo a -&gt; EvidenceInfo a -&gt; Ordering
forall a.
Ord a =&gt;
EvidenceInfo a -&gt; EvidenceInfo a -&gt; EvidenceInfo a
min :: EvidenceInfo a -&gt; EvidenceInfo a -&gt; EvidenceInfo a
$cmin :: forall a.
Ord a =&gt;
EvidenceInfo a -&gt; EvidenceInfo a -&gt; EvidenceInfo a
max :: EvidenceInfo a -&gt; EvidenceInfo a -&gt; EvidenceInfo a
$cmax :: forall a.
Ord a =&gt;
EvidenceInfo a -&gt; EvidenceInfo a -&gt; EvidenceInfo a
&gt;= :: EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
$c&gt;= :: forall a. Ord a =&gt; EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
&gt; :: EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
$c&gt; :: forall a. Ord a =&gt; EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
&lt;= :: EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
$c&lt;= :: forall a. Ord a =&gt; EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
&lt; :: EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
$c&lt; :: forall a. Ord a =&gt; EvidenceInfo a -&gt; EvidenceInfo a -&gt; Bool
compare :: EvidenceInfo a -&gt; EvidenceInfo a -&gt; Ordering
$ccompare :: forall a. Ord a =&gt; EvidenceInfo a -&gt; EvidenceInfo a -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span id="local-6989586621680999535"><span id="local-6989586621680999537"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; EvidenceInfo a -&gt; EvidenceInfo b)
-&gt; (forall a b. a -&gt; EvidenceInfo b -&gt; EvidenceInfo a)
-&gt; Functor EvidenceInfo
forall a b. a -&gt; EvidenceInfo b -&gt; EvidenceInfo a
forall a b. (a -&gt; b) -&gt; EvidenceInfo a -&gt; EvidenceInfo b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; EvidenceInfo b -&gt; EvidenceInfo a
$c&lt;$ :: forall a b. a -&gt; EvidenceInfo b -&gt; EvidenceInfo a
fmap :: forall a b. (a -&gt; b) -&gt; EvidenceInfo a -&gt; EvidenceInfo b
$cfmap :: forall a b. (a -&gt; b) -&gt; EvidenceInfo a -&gt; EvidenceInfo b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span id="local-6989586621680999963"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680999530"><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999963"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#EvidenceInfo"><span class="hs-identifier hs-type">EvidenceInfo</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999963"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-109"></span><span>  </span><span id="local-6989586621680999523"><span class="annot"><span class="annottext">ppr :: EvidenceInfo a -&gt; SDoc
</span><a href="#local-6989586621680999523"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#EvidenceInfo"><span class="hs-identifier hs-type">EvidenceInfo</span></a></span><span> </span><span id="local-6989586621680999522"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999522"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621680999521"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999521"><span class="hs-identifier hs-var">span</span></a></span></span><span> </span><span id="local-6989586621680999520"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680999520"><span class="hs-identifier hs-var">typ</span></a></span></span><span> </span><span id="local-6989586621680999519"><span class="annot"><span class="annottext">Maybe (EvVarSource, Scope, Maybe Span)
</span><a href="#local-6989586621680999519"><span class="hs-identifier hs-var">dets</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-110"></span><span>    </span><span class="annot"><span class="annottext">SDoc -&gt; Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999522"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;at&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999521"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">O.&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;, of type:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680999520"><span class="hs-identifier hs-var">typ</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-111"></span><span>      </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621680999515"><span class="hs-identifier hs-var">pdets</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; SDoc
</span><a href="GHC.Types.Name.html#pprDefinedAt"><span class="hs-identifier hs-var">pprDefinedAt</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999522"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-113"></span><span>      </span><span id="local-6989586621680999515"><span class="annot"><span class="annottext">pdets :: SDoc
</span><a href="#local-6989586621680999515"><span class="hs-identifier hs-var hs-var">pdets</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe (EvVarSource, Scope, Maybe Span)
</span><a href="#local-6989586621680999519"><span class="hs-identifier hs-var">dets</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-114"></span><span>        </span><span class="annot"><span class="annottext">Maybe (EvVarSource, Scope, Maybe Span)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;is a usage of an external evidence variable&quot;</span></span><span>
</span><span id="line-115"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680999510"><span class="annot"><span class="annottext">EvVarSource
</span><a href="#local-6989586621680999510"><span class="hs-identifier hs-var">src</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680999509"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999509"><span class="hs-identifier hs-var">scp</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680999508"><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999508"><span class="hs-identifier hs-var">spn</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;is an&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EvVarSource -&gt; Scope -&gt; Maybe Span -&gt; ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#EvidenceVarBind"><span class="hs-identifier hs-var">EvidenceVarBind</span></a></span><span> </span><span class="annot"><span class="annottext">EvVarSource
</span><a href="#local-6989586621680999510"><span class="hs-identifier hs-var">src</span></a></span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999509"><span class="hs-identifier hs-var">scp</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999508"><span class="hs-identifier hs-var">spn</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span id="local-6989586621680999962"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getEvidenceTreesAtPoint"><span class="hs-identifier hs-type">getEvidenceTreesAtPoint</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieFile"><span class="hs-identifier hs-type">HieFile</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#RefMap"><span class="hs-identifier hs-type">RefMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999962"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">,</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Tree.html#Forest"><span class="hs-identifier hs-type">Tree.Forest</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#EvidenceInfo"><span class="hs-identifier hs-type">EvidenceInfo</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999962"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-118"></span><span id="getEvidenceTreesAtPoint"><span class="annot"><span class="annottext">getEvidenceTreesAtPoint :: forall a.
HieFile -&gt; RefMap a -&gt; (Int, Int) -&gt; Forest (EvidenceInfo a)
</span><a href="GHC.Iface.Ext.Utils.html#getEvidenceTreesAtPoint"><span class="hs-identifier hs-var hs-var">getEvidenceTreesAtPoint</span></a></span></span><span> </span><span id="local-6989586621680999503"><span class="annot"><span class="annottext">HieFile
</span><a href="#local-6989586621680999503"><span class="hs-identifier hs-var">hf</span></a></span></span><span> </span><span id="local-6989586621680999502"><span class="annot"><span class="annottext">RefMap a
</span><a href="#local-6989586621680999502"><span class="hs-identifier hs-var">refmap</span></a></span></span><span> </span><span id="local-6989586621680999501"><span class="annot"><span class="annottext">(Int, Int)
</span><a href="#local-6989586621680999501"><span class="hs-identifier hs-var">point</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-119"></span><span>  </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Tree (EvidenceInfo a)
</span><a href="#local-6989586621680999500"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680999499"><span class="annot"><span class="annottext">HieAST Int
</span><a href="#local-6989586621680999499"><span class="hs-identifier hs-var">ast</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST Int) -&gt; [Maybe (HieAST Int)]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (HieAST Int) -&gt; [Maybe (HieAST Int)])
-&gt; Maybe (HieAST Int) -&gt; [Maybe (HieAST Int)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HieFile -&gt; (Int, Int) -&gt; Maybe (HieAST Int)
</span><a href="GHC.Iface.Ext.Utils.html#selectPoint"><span class="hs-identifier hs-var">selectPoint</span></a></span><span> </span><span class="annot"><span class="annottext">HieFile
</span><a href="#local-6989586621680999503"><span class="hs-identifier hs-var">hf</span></a></span><span> </span><span class="annot"><span class="annottext">(Int, Int)
</span><a href="#local-6989586621680999501"><span class="hs-identifier hs-var">point</span></a></span><span>
</span><span id="line-120"></span><span>     </span><span class="hs-special">,</span><span> </span><span id="local-6989586621680999498"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999498"><span class="hs-identifier hs-var">n</span></a></span></span><span>        </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">NodeIdentifiers Int -&gt; [Name]
forall a. NodeIdentifiers a -&gt; [Name]
</span><a href="GHC.Iface.Ext.Utils.html#findEvidenceUse"><span class="hs-identifier hs-var">findEvidenceUse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SourcedNodeInfo Int -&gt; NodeIdentifiers Int
forall a. SourcedNodeInfo a -&gt; NodeIdentifiers a
</span><a href="GHC.Iface.Ext.Utils.html#sourcedNodeIdents"><span class="hs-identifier hs-var">sourcedNodeIdents</span></a></span><span> </span><span class="annot"><span class="annottext">(SourcedNodeInfo Int -&gt; NodeIdentifiers Int)
-&gt; SourcedNodeInfo Int -&gt; NodeIdentifiers Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Int -&gt; SourcedNodeInfo Int
forall a. HieAST a -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#sourcedNodeInfo"><span class="hs-identifier hs-var hs-var">sourcedNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Int
</span><a href="#local-6989586621680999499"><span class="hs-identifier hs-var">ast</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>     </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680999500"><span class="annot"><span class="annottext">Tree (EvidenceInfo a)
</span><a href="#local-6989586621680999500"><span class="hs-identifier hs-var">t</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe (Tree (EvidenceInfo a)) -&gt; [Maybe (Tree (EvidenceInfo a))]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (Tree (EvidenceInfo a)) -&gt; [Maybe (Tree (EvidenceInfo a))])
-&gt; Maybe (Tree (EvidenceInfo a)) -&gt; [Maybe (Tree (EvidenceInfo a))]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">RefMap a -&gt; Name -&gt; Maybe (Tree (EvidenceInfo a))
forall a. RefMap a -&gt; Name -&gt; Maybe (Tree (EvidenceInfo a))
</span><a href="GHC.Iface.Ext.Utils.html#getEvidenceTree"><span class="hs-identifier hs-var">getEvidenceTree</span></a></span><span> </span><span class="annot"><span class="annottext">RefMap a
</span><a href="#local-6989586621680999502"><span class="hs-identifier hs-var">refmap</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999498"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-122"></span><span>     </span><span class="hs-special">]</span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span id="local-6989586621680999958"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getEvidenceTree"><span class="hs-identifier hs-type">getEvidenceTree</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#RefMap"><span class="hs-identifier hs-type">RefMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999958"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Tree.html#Tree"><span class="hs-identifier hs-type">Tree.Tree</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#EvidenceInfo"><span class="hs-identifier hs-type">EvidenceInfo</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999958"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-125"></span><span id="getEvidenceTree"><span class="annot"><span class="annottext">getEvidenceTree :: forall a. RefMap a -&gt; Name -&gt; Maybe (Tree (EvidenceInfo a))
</span><a href="GHC.Iface.Ext.Utils.html#getEvidenceTree"><span class="hs-identifier hs-var hs-var">getEvidenceTree</span></a></span></span><span> </span><span id="local-6989586621680999496"><span class="annot"><span class="annottext">RefMap a
</span><a href="#local-6989586621680999496"><span class="hs-identifier hs-var">refmap</span></a></span></span><span> </span><span id="local-6989586621680999495"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999495"><span class="hs-identifier hs-var">var</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; Name -&gt; Maybe (Tree (EvidenceInfo a))
</span><a href="#local-6989586621680999494"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="GHC.Types.Name.Set.html#emptyNameSet"><span class="hs-identifier hs-var">emptyNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999495"><span class="hs-identifier hs-var">var</span></a></span><span>
</span><span id="line-126"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-127"></span><span>    </span><span id="local-6989586621680999494"><span class="annot"><span class="annottext">go :: NameSet -&gt; Name -&gt; Maybe (Tree (EvidenceInfo a))
</span><a href="#local-6989586621680999494"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621680999467"><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680999467"><span class="hs-identifier hs-var">seen</span></a></span></span><span> </span><span id="local-6989586621680999466"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999466"><span class="hs-identifier hs-var">var</span></a></span></span><span>
</span><span id="line-128"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999466"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSet -&gt; Bool
</span><a href="GHC.Types.Name.Set.html#elemNameSet"><span class="hs-operator hs-var">`elemNameSet`</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680999467"><span class="hs-identifier hs-var">seen</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Tree (EvidenceInfo a))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-129"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-130"></span><span>          </span><span id="local-6989586621680999464"><span class="annot"><span class="annottext">[(Span, IdentifierDetails a)]
</span><a href="#local-6989586621680999464"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Identifier -&gt; RefMap a -&gt; Maybe [(Span, IdentifierDetails a)]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">M.lookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Identifier
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999466"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">RefMap a
</span><a href="#local-6989586621680999496"><span class="hs-identifier hs-var">refmap</span></a></span><span>
</span><span id="line-131"></span><span>          </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">((Span, IdentifierDetails a) -&gt; Bool)
-&gt; [(Span, IdentifierDetails a)]
-&gt; Maybe (Span, IdentifierDetails a)
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Maybe a
</span><a href="../../base/src/Data.Foldable.html#find"><span class="hs-identifier hs-var">find</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ContextInfo -&gt; Bool) -&gt; Set ContextInfo -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#isEvidenceBind"><span class="hs-identifier hs-var">isEvidenceBind</span></a></span><span> </span><span class="annot"><span class="annottext">(Set ContextInfo -&gt; Bool)
-&gt; ((Span, IdentifierDetails a) -&gt; Set ContextInfo)
-&gt; (Span, IdentifierDetails a)
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; Set ContextInfo
forall a. IdentifierDetails a -&gt; Set ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#identInfo"><span class="hs-identifier hs-var hs-var">identInfo</span></a></span><span> </span><span class="annot"><span class="annottext">(IdentifierDetails a -&gt; Set ContextInfo)
-&gt; ((Span, IdentifierDetails a) -&gt; IdentifierDetails a)
-&gt; (Span, IdentifierDetails a)
-&gt; Set ContextInfo
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Span, IdentifierDetails a) -&gt; IdentifierDetails a
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(Span, IdentifierDetails a)]
</span><a href="#local-6989586621680999464"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-132"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680999461"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999461"><span class="hs-identifier hs-var">sp</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680999460"><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999460"><span class="hs-identifier hs-var">dets</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-133"></span><span>              </span><span id="local-6989586621680999459"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680999459"><span class="hs-identifier hs-var">typ</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; Maybe a
forall a. IdentifierDetails a -&gt; Maybe a
</span><a href="GHC.Iface.Ext.Types.html#identType"><span class="hs-identifier hs-var hs-var">identType</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999460"><span class="hs-identifier hs-var">dets</span></a></span><span>
</span><span id="line-134"></span><span>              </span><span class="hs-special">(</span><span id="local-6989586621680999457"><span class="annot"><span class="annottext">(EvVarSource, Scope, Maybe Span)
</span><a href="#local-6989586621680999457"><span class="hs-identifier hs-var">evdet</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680999456"><span class="annot"><span class="annottext">[Tree (EvidenceInfo a)]
</span><a href="#local-6989586621680999456"><span class="hs-identifier hs-var">children</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">First ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
-&gt; Maybe
     ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
forall a. First a -&gt; Maybe a
</span><a href="../../base/src/Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">(First ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
 -&gt; Maybe
      ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)]))
-&gt; First
     ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
-&gt; Maybe
     ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
 -&gt; First
      ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)]))
-&gt; [Maybe
      ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])]
-&gt; First
     ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
-&gt; First
     ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">([Maybe
    ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])]
 -&gt; First
      ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)]))
-&gt; [Maybe
      ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])]
-&gt; First
     ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-135"></span><span>                 </span><span id="local-6989586621680999455"><span class="annot"><span class="annottext">ContextInfo
</span><a href="#local-6989586621680999455"><span class="hs-identifier hs-var">det</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Set ContextInfo -&gt; [ContextInfo]
forall a. Set a -&gt; [a]
</span><a href="../../containers/src/Data.Set.Internal.html#toList"><span class="hs-identifier hs-var">S.toList</span></a></span><span> </span><span class="annot"><span class="annottext">(Set ContextInfo -&gt; [ContextInfo])
-&gt; Set ContextInfo -&gt; [ContextInfo]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; Set ContextInfo
forall a. IdentifierDetails a -&gt; Set ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#identInfo"><span class="hs-identifier hs-var hs-var">identInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999460"><span class="hs-identifier hs-var">dets</span></a></span><span>
</span><span id="line-136"></span><span>                 </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><a href="#local-6989586621680999455"><span class="hs-identifier hs-var">det</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-137"></span><span>                   </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#EvidenceVarBind"><span class="hs-identifier hs-type">EvidenceVarBind</span></a></span><span> </span><span id="local-6989586621680999453"><span class="annot"><span class="annottext">src :: EvVarSource
</span><a href="#local-6989586621680999453"><span class="hs-identifier hs-var">src</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#EvLetBind"><span class="hs-identifier hs-type">EvLetBind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">EvBindDeps -&gt; [Name]
</span><a href="GHC.Iface.Ext.Types.html#getEvBindDeps"><span class="hs-identifier hs-var hs-var">getEvBindDeps</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span id="local-6989586621680999450"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680999450"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680999449"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999449"><span class="hs-identifier hs-var">scp</span></a></span></span><span> </span><span id="local-6989586621680999448"><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999448"><span class="hs-identifier hs-var">spn</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-138"></span><span>                     </span><span class="annot"><span class="annottext">Maybe ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
-&gt; [Maybe
      ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
 -&gt; [Maybe
       ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])])
-&gt; Maybe
     ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
-&gt; [Maybe
      ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
-&gt; Maybe
     ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">EvVarSource
</span><a href="#local-6989586621680999453"><span class="hs-identifier hs-var">src</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999449"><span class="hs-identifier hs-var">scp</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999448"><span class="hs-identifier hs-var">spn</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">(Name -&gt; Maybe (Tree (EvidenceInfo a)))
-&gt; [Name] -&gt; [Tree (EvidenceInfo a)]
forall a b. (a -&gt; Maybe b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/Data.Maybe.html#mapMaybe"><span class="hs-identifier hs-var">mapMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NameSet -&gt; Name -&gt; Maybe (Tree (EvidenceInfo a))
</span><a href="#local-6989586621680999494"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">(NameSet -&gt; Name -&gt; Maybe (Tree (EvidenceInfo a)))
-&gt; NameSet -&gt; Name -&gt; Maybe (Tree (EvidenceInfo a))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; Name -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#extendNameSet"><span class="hs-identifier hs-var">extendNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621680999467"><span class="hs-identifier hs-var">seen</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999466"><span class="hs-identifier hs-var">var</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680999450"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-139"></span><span>                   </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#EvidenceVarBind"><span class="hs-identifier hs-type">EvidenceVarBind</span></a></span><span> </span><span id="local-6989586621680999446"><span class="annot"><span class="annottext">EvVarSource
</span><a href="#local-6989586621680999446"><span class="hs-identifier hs-var">src</span></a></span></span><span> </span><span id="local-6989586621680999445"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999445"><span class="hs-identifier hs-var">scp</span></a></span></span><span> </span><span id="local-6989586621680999444"><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999444"><span class="hs-identifier hs-var">spn</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
-&gt; [Maybe
      ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
 -&gt; [Maybe
       ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])])
-&gt; Maybe
     ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
-&gt; [Maybe
      ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
-&gt; Maybe
     ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">EvVarSource
</span><a href="#local-6989586621680999446"><span class="hs-identifier hs-var">src</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999445"><span class="hs-identifier hs-var">scp</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999444"><span class="hs-identifier hs-var">spn</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>                   </span><span class="annot"><span class="annottext">ContextInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
-&gt; [Maybe
      ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe ((EvVarSource, Scope, Maybe Span), [Tree (EvidenceInfo a)])
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-141"></span><span>              </span><span class="annot"><span class="annottext">Tree (EvidenceInfo a) -&gt; Maybe (Tree (EvidenceInfo a))
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Tree (EvidenceInfo a) -&gt; Maybe (Tree (EvidenceInfo a)))
-&gt; Tree (EvidenceInfo a) -&gt; Maybe (Tree (EvidenceInfo a))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">EvidenceInfo a -&gt; [Tree (EvidenceInfo a)] -&gt; Tree (EvidenceInfo a)
forall a. a -&gt; [Tree a] -&gt; Tree a
</span><a href="../../containers/src/Data.Tree.html#Node"><span class="hs-identifier hs-var">Tree.Node</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
-&gt; Span
-&gt; a
-&gt; Maybe (EvVarSource, Scope, Maybe Span)
-&gt; EvidenceInfo a
forall a.
Name
-&gt; Span
-&gt; a
-&gt; Maybe (EvVarSource, Scope, Maybe Span)
-&gt; EvidenceInfo a
</span><a href="GHC.Iface.Ext.Utils.html#EvidenceInfo"><span class="hs-identifier hs-var">EvidenceInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999466"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999461"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680999459"><span class="hs-identifier hs-var">typ</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(EvVarSource, Scope, Maybe Span)
-&gt; Maybe (EvVarSource, Scope, Maybe Span)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(EvVarSource, Scope, Maybe Span)
</span><a href="#local-6989586621680999457"><span class="hs-identifier hs-var">evdet</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Tree (EvidenceInfo a)]
</span><a href="#local-6989586621680999456"><span class="hs-identifier hs-var">children</span></a></span><span>
</span><span id="line-142"></span><span>            </span><span class="hs-comment">-- It is externally bound</span><span>
</span><span id="line-143"></span><span>            </span><span class="annot"><span class="annottext">Maybe (Span, IdentifierDetails a)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">First (Tree (EvidenceInfo a)) -&gt; Maybe (Tree (EvidenceInfo a))
forall a. First a -&gt; Maybe a
</span><a href="../../base/src/Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">(First (Tree (EvidenceInfo a)) -&gt; Maybe (Tree (EvidenceInfo a)))
-&gt; First (Tree (EvidenceInfo a)) -&gt; Maybe (Tree (EvidenceInfo a))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (Tree (EvidenceInfo a)) -&gt; First (Tree (EvidenceInfo a)))
-&gt; [Maybe (Tree (EvidenceInfo a))] -&gt; First (Tree (EvidenceInfo a))
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Tree (EvidenceInfo a)) -&gt; First (Tree (EvidenceInfo a))
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">([Maybe (Tree (EvidenceInfo a))] -&gt; First (Tree (EvidenceInfo a)))
-&gt; [Maybe (Tree (EvidenceInfo a))] -&gt; First (Tree (EvidenceInfo a))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-144"></span><span>              </span><span class="hs-special">(</span><span id="local-6989586621680999442"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999442"><span class="hs-identifier hs-var">sp</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680999441"><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999441"><span class="hs-identifier hs-var">dets</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(Span, IdentifierDetails a)]
</span><a href="#local-6989586621680999464"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-145"></span><span>              </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ContextInfo -&gt; Bool) -&gt; Set ContextInfo -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#isEvidenceUse"><span class="hs-identifier hs-var">isEvidenceUse</span></a></span><span> </span><span class="annot"><span class="annottext">(Set ContextInfo -&gt; Bool) -&gt; Set ContextInfo -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; Set ContextInfo
forall a. IdentifierDetails a -&gt; Set ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#identInfo"><span class="hs-identifier hs-var hs-var">identInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999441"><span class="hs-identifier hs-var">dets</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-146"></span><span>                </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-147"></span><span>                  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; Maybe a
forall a. IdentifierDetails a -&gt; Maybe a
</span><a href="GHC.Iface.Ext.Types.html#identType"><span class="hs-identifier hs-var hs-var">identType</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999441"><span class="hs-identifier hs-var">dets</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-148"></span><span>                    </span><span class="annot"><span class="annottext">Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Tree (EvidenceInfo a)) -&gt; [Maybe (Tree (EvidenceInfo a))]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Tree (EvidenceInfo a))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-149"></span><span>                    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680999440"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680999440"><span class="hs-identifier hs-var">typ</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Tree (EvidenceInfo a)) -&gt; [Maybe (Tree (EvidenceInfo a))]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (Tree (EvidenceInfo a)) -&gt; [Maybe (Tree (EvidenceInfo a))])
-&gt; Maybe (Tree (EvidenceInfo a)) -&gt; [Maybe (Tree (EvidenceInfo a))]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Tree (EvidenceInfo a) -&gt; Maybe (Tree (EvidenceInfo a))
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Tree (EvidenceInfo a) -&gt; Maybe (Tree (EvidenceInfo a)))
-&gt; Tree (EvidenceInfo a) -&gt; Maybe (Tree (EvidenceInfo a))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">EvidenceInfo a -&gt; [Tree (EvidenceInfo a)] -&gt; Tree (EvidenceInfo a)
forall a. a -&gt; [Tree a] -&gt; Tree a
</span><a href="../../containers/src/Data.Tree.html#Node"><span class="hs-identifier hs-var">Tree.Node</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
-&gt; Span
-&gt; a
-&gt; Maybe (EvVarSource, Scope, Maybe Span)
-&gt; EvidenceInfo a
forall a.
Name
-&gt; Span
-&gt; a
-&gt; Maybe (EvVarSource, Scope, Maybe Span)
-&gt; EvidenceInfo a
</span><a href="GHC.Iface.Ext.Utils.html#EvidenceInfo"><span class="hs-identifier hs-var">EvidenceInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999466"><span class="hs-identifier hs-var">var</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999442"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680999440"><span class="hs-identifier hs-var">typ</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (EvVarSource, Scope, Maybe Span)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-150"></span><span>                </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe (Tree (EvidenceInfo a)) -&gt; [Maybe (Tree (EvidenceInfo a))]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Tree (EvidenceInfo a))
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#hieTypeToIface"><span class="hs-identifier hs-type">hieTypeToIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieTypeFix"><span class="hs-identifier hs-type">HieTypeFix</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Type.html#IfaceType"><span class="hs-identifier hs-type">IfaceType</span></a></span><span>
</span><span id="line-153"></span><span id="hieTypeToIface"><span class="annot"><span class="annottext">hieTypeToIface :: HieTypeFix -&gt; IfaceType
</span><a href="GHC.Iface.Ext.Utils.html#hieTypeToIface"><span class="hs-identifier hs-var hs-var">hieTypeToIface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HieType IfaceType -&gt; IfaceType) -&gt; HieTypeFix -&gt; IfaceType
forall a. (HieType a -&gt; a) -&gt; HieTypeFix -&gt; a
</span><a href="GHC.Iface.Ext.Utils.html#foldType"><span class="hs-identifier hs-var">foldType</span></a></span><span> </span><span class="annot"><span class="annottext">HieType IfaceType -&gt; IfaceType
</span><a href="#local-6989586621680999439"><span class="hs-identifier hs-var">go</span></a></span><span>
</span><span id="line-154"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-155"></span><span>    </span><span id="local-6989586621680999439"><span class="annot"><span class="annottext">go :: HieType IfaceType -&gt; IfaceType
</span><a href="#local-6989586621680999439"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HTyVarTy"><span class="hs-identifier hs-type">HTyVarTy</span></a></span><span> </span><span id="local-6989586621680999433"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999433"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; IfaceType
</span><a href="GHC.Iface.Type.html#IfaceTyVar"><span class="hs-identifier hs-var">IfaceTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">(FastString -&gt; IfaceType) -&gt; FastString -&gt; IfaceType
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">OccName -&gt; FastString
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; FastString) -&gt; OccName -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999433"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-156"></span><span>    </span><span class="annot"><a href="#local-6989586621680999439"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HAppTy"><span class="hs-identifier hs-type">HAppTy</span></a></span><span> </span><span id="local-6989586621680999428"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999428"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680999427"><span class="annot"><span class="annottext">HieArgs IfaceType
</span><a href="#local-6989586621680999427"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceType -&gt; IfaceAppArgs -&gt; IfaceType
</span><a href="GHC.Iface.Type.html#IfaceAppTy"><span class="hs-identifier hs-var">IfaceAppTy</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999428"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieArgs IfaceType -&gt; IfaceAppArgs
</span><a href="#local-6989586621680999425"><span class="hs-identifier hs-var">hieToIfaceArgs</span></a></span><span> </span><span class="annot"><span class="annottext">HieArgs IfaceType
</span><a href="#local-6989586621680999427"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-157"></span><span>    </span><span class="annot"><a href="#local-6989586621680999439"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HLitTy"><span class="hs-identifier hs-type">HLitTy</span></a></span><span> </span><span id="local-6989586621680999423"><span class="annot"><span class="annottext">IfaceTyLit
</span><a href="#local-6989586621680999423"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceTyLit -&gt; IfaceType
</span><a href="GHC.Iface.Type.html#IfaceLitTy"><span class="hs-identifier hs-var">IfaceLitTy</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTyLit
</span><a href="#local-6989586621680999423"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-158"></span><span>    </span><span class="annot"><a href="#local-6989586621680999439"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HForAllTy"><span class="hs-identifier hs-type">HForAllTy</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621680999420"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999420"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680999419"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999419"><span class="hs-identifier hs-var">k</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span id="local-6989586621680999418"><span class="annot"><span class="annottext">ArgFlag
</span><a href="#local-6989586621680999418"><span class="hs-identifier hs-var">af</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680999417"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999417"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680999415"><span class="annot"><span class="annottext">b :: (FastString, IfaceType)
</span><a href="#local-6989586621680999415"><span class="hs-identifier hs-var hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName -&gt; FastString
</span><a href="GHC.Types.Name.Occurrence.html#occNameFS"><span class="hs-identifier hs-var hs-var">occNameFS</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName -&gt; FastString) -&gt; OccName -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
forall a. NamedThing a =&gt; a -&gt; OccName
</span><a href="GHC.Types.Name.html#getOccName"><span class="hs-identifier hs-var">getOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999420"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999419"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>                                  </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">IfaceForAllBndr -&gt; IfaceType -&gt; IfaceType
</span><a href="GHC.Iface.Type.html#IfaceForAllTy"><span class="hs-identifier hs-var">IfaceForAllTy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceBndr -&gt; ArgFlag -&gt; IfaceForAllBndr
forall var argf. var -&gt; argf -&gt; VarBndr var argf
</span><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-var">Bndr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FastString, IfaceType) -&gt; IfaceBndr
</span><a href="GHC.Iface.Type.html#IfaceTvBndr"><span class="hs-identifier hs-var">IfaceTvBndr</span></a></span><span> </span><span class="annot"><span class="annottext">(FastString, IfaceType)
</span><a href="#local-6989586621680999415"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ArgFlag
</span><a href="#local-6989586621680999418"><span class="hs-identifier hs-var">af</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999417"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-160"></span><span>    </span><span class="annot"><a href="#local-6989586621680999439"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HFunTy"><span class="hs-identifier hs-type">HFunTy</span></a></span><span> </span><span id="local-6989586621680999411"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999411"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621680999410"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999410"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680999409"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999409"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AnonArgFlag -&gt; IfaceType -&gt; IfaceType -&gt; IfaceType -&gt; IfaceType
</span><a href="GHC.Iface.Type.html#IfaceFunTy"><span class="hs-identifier hs-var">IfaceFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">AnonArgFlag
</span><a href="GHC.Types.Var.html#VisArg"><span class="hs-identifier hs-var">VisArg</span></a></span><span>   </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999411"><span class="hs-identifier hs-var">w</span></a></span><span>       </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999410"><span class="hs-identifier hs-var">a</span></a></span><span>    </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999409"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-161"></span><span>    </span><span class="annot"><a href="#local-6989586621680999439"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HQualTy"><span class="hs-identifier hs-type">HQualTy</span></a></span><span> </span><span id="local-6989586621680999405"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999405"><span class="hs-identifier hs-var">pred</span></a></span></span><span> </span><span id="local-6989586621680999404"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999404"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AnonArgFlag -&gt; IfaceType -&gt; IfaceType -&gt; IfaceType -&gt; IfaceType
</span><a href="GHC.Iface.Type.html#IfaceFunTy"><span class="hs-identifier hs-var">IfaceFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">AnonArgFlag
</span><a href="GHC.Types.Var.html#InvisArg"><span class="hs-identifier hs-var">InvisArg</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="GHC.Iface.Type.html#many_ty"><span class="hs-identifier hs-var">many_ty</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999405"><span class="hs-identifier hs-var">pred</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999404"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-162"></span><span>    </span><span class="annot"><a href="#local-6989586621680999439"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HCastTy"><span class="hs-identifier hs-type">HCastTy</span></a></span><span> </span><span id="local-6989586621680999400"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999400"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999400"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-163"></span><span>    </span><span class="annot"><a href="#local-6989586621680999439"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">HieType IfaceType
</span><a href="GHC.Iface.Ext.Types.html#HCoercionTy"><span class="hs-identifier hs-var">HCoercionTy</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; IfaceType
</span><a href="GHC.Iface.Type.html#IfaceTyVar"><span class="hs-identifier hs-var">IfaceTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><span class="hs-string">&quot;&lt;coercion type&gt;&quot;</span></span><span>
</span><span id="line-164"></span><span>    </span><span class="annot"><a href="#local-6989586621680999439"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HTyConApp"><span class="hs-identifier hs-type">HTyConApp</span></a></span><span> </span><span id="local-6989586621680999397"><span class="annot"><span class="annottext">IfaceTyCon
</span><a href="#local-6989586621680999397"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680999396"><span class="annot"><span class="annottext">HieArgs IfaceType
</span><a href="#local-6989586621680999396"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceTyCon -&gt; IfaceAppArgs -&gt; IfaceType
</span><a href="GHC.Iface.Type.html#IfaceTyConApp"><span class="hs-identifier hs-var">IfaceTyConApp</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTyCon
</span><a href="#local-6989586621680999397"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieArgs IfaceType -&gt; IfaceAppArgs
</span><a href="#local-6989586621680999425"><span class="hs-identifier hs-var">hieToIfaceArgs</span></a></span><span> </span><span class="annot"><span class="annottext">HieArgs IfaceType
</span><a href="#local-6989586621680999396"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span>    </span><span class="hs-comment">-- This isn't fully faithful - we can't produce the 'Inferred' case</span><span>
</span><span id="line-167"></span><span>    </span><span class="annot"><a href="#local-6989586621680999425"><span class="hs-identifier hs-type">hieToIfaceArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieArgs"><span class="hs-identifier hs-type">HieArgs</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Type.html#IfaceType"><span class="hs-identifier hs-type">IfaceType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Type.html#IfaceAppArgs"><span class="hs-identifier hs-type">IfaceAppArgs</span></a></span><span>
</span><span id="line-168"></span><span>    </span><span id="local-6989586621680999425"><span class="annot"><span class="annottext">hieToIfaceArgs :: HieArgs IfaceType -&gt; IfaceAppArgs
</span><a href="#local-6989586621680999425"><span class="hs-identifier hs-var hs-var">hieToIfaceArgs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieArgs"><span class="hs-identifier hs-type">HieArgs</span></a></span><span> </span><span id="local-6989586621680999393"><span class="annot"><span class="annottext">[(Bool, IfaceType)]
</span><a href="#local-6989586621680999393"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Bool, IfaceType)] -&gt; IfaceAppArgs
</span><a href="#local-6989586621680999392"><span class="hs-identifier hs-var">go'</span></a></span><span> </span><span class="annot"><span class="annottext">[(Bool, IfaceType)]
</span><a href="#local-6989586621680999393"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-169"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-170"></span><span>        </span><span id="local-6989586621680999392"><span class="annot"><span class="annottext">go' :: [(Bool, IfaceType)] -&gt; IfaceAppArgs
</span><a href="#local-6989586621680999392"><span class="hs-identifier hs-var hs-var">go'</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceAppArgs
</span><a href="GHC.Iface.Type.html#IA_Nil"><span class="hs-identifier hs-var">IA_Nil</span></a></span><span>
</span><span id="line-171"></span><span>        </span><span class="annot"><a href="#local-6989586621680999392"><span class="hs-identifier hs-var">go'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">,</span><span id="local-6989586621680999390"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999390"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999389"><span class="annot"><span class="annottext">[(Bool, IfaceType)]
</span><a href="#local-6989586621680999389"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceType -&gt; ArgFlag -&gt; IfaceAppArgs -&gt; IfaceAppArgs
</span><a href="GHC.Iface.Type.html#IA_Arg"><span class="hs-identifier hs-var">IA_Arg</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999390"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">ArgFlag
</span><a href="GHC.Types.Var.html#Required"><span class="hs-identifier hs-var">Required</span></a></span><span> </span><span class="annot"><span class="annottext">(IfaceAppArgs -&gt; IfaceAppArgs) -&gt; IfaceAppArgs -&gt; IfaceAppArgs
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[(Bool, IfaceType)] -&gt; IfaceAppArgs
</span><a href="#local-6989586621680999392"><span class="hs-identifier hs-var">go'</span></a></span><span> </span><span class="annot"><span class="annottext">[(Bool, IfaceType)]
</span><a href="#local-6989586621680999389"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-172"></span><span>        </span><span class="annot"><a href="#local-6989586621680999392"><span class="hs-identifier hs-var">go'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span id="local-6989586621680999386"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999386"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999385"><span class="annot"><span class="annottext">[(Bool, IfaceType)]
</span><a href="#local-6989586621680999385"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceType -&gt; ArgFlag -&gt; IfaceAppArgs -&gt; IfaceAppArgs
</span><a href="GHC.Iface.Type.html#IA_Arg"><span class="hs-identifier hs-var">IA_Arg</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621680999386"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">ArgFlag
</span><a href="GHC.Types.Var.html#Specified"><span class="hs-identifier hs-var">Specified</span></a></span><span> </span><span class="annot"><span class="annottext">(IfaceAppArgs -&gt; IfaceAppArgs) -&gt; IfaceAppArgs -&gt; IfaceAppArgs
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[(Bool, IfaceType)] -&gt; IfaceAppArgs
</span><a href="#local-6989586621680999392"><span class="hs-identifier hs-var">go'</span></a></span><span> </span><span class="annot"><span class="annottext">[(Bool, IfaceType)]
</span><a href="#local-6989586621680999385"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span class="hs-keyword">data</span><span> </span><span id="HieTypeState"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#HieTypeState"><span class="hs-identifier hs-var">HieTypeState</span></a></span></span><span>
</span><span id="line-175"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="HTS"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#HTS"><span class="hs-identifier hs-var">HTS</span></a></span></span><span>
</span><span id="line-176"></span><span>    </span><span class="hs-special">{</span><span> </span><span id="tyMap"><span class="annot"><span class="annottext">HieTypeState -&gt; TypeMap Int
</span><a href="GHC.Iface.Ext.Utils.html#tyMap"><span class="hs-identifier hs-var hs-var">tyMap</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Map.html#TypeMap"><span class="hs-identifier hs-type">TypeMap</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TypeIndex"><span class="hs-identifier hs-type">TypeIndex</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="htyTable"><span class="annot"><span class="annottext">HieTypeState -&gt; IntMap HieTypeFlat
</span><a href="GHC.Iface.Ext.Utils.html#htyTable"><span class="hs-identifier hs-var hs-var">htyTable</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.IntMap.Internal.html#IntMap"><span class="hs-identifier hs-type">IM.IntMap</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieTypeFlat"><span class="hs-identifier hs-type">HieTypeFlat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-178"></span><span>    </span><span class="hs-special">,</span><span> </span><span id="freshIndex"><span class="annot"><span class="annottext">HieTypeState -&gt; Int
</span><a href="GHC.Iface.Ext.Utils.html#freshIndex"><span class="hs-identifier hs-var hs-var">freshIndex</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TypeIndex"><span class="hs-identifier hs-type">TypeIndex</span></a></span><span>
</span><span id="line-179"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#initialHTS"><span class="hs-identifier hs-type">initialHTS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#HieTypeState"><span class="hs-identifier hs-type">HieTypeState</span></a></span><span>
</span><span id="line-182"></span><span id="initialHTS"><span class="annot"><span class="annottext">initialHTS :: HieTypeState
</span><a href="GHC.Iface.Ext.Utils.html#initialHTS"><span class="hs-identifier hs-var hs-var">initialHTS</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeMap Int -&gt; IntMap HieTypeFlat -&gt; Int -&gt; HieTypeState
</span><a href="GHC.Iface.Ext.Utils.html#HTS"><span class="hs-identifier hs-var">HTS</span></a></span><span> </span><span class="annot"><span class="annottext">TypeMap Int
forall a. TypeMap a
</span><a href="GHC.Core.Map.html#emptyTypeMap"><span class="hs-identifier hs-var">emptyTypeMap</span></a></span><span> </span><span class="annot"><span class="annottext">IntMap HieTypeFlat
forall a. IntMap a
</span><a href="../../containers/src/Data.IntMap.Internal.html#empty"><span class="hs-identifier hs-var">IM.empty</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#freshTypeIndex"><span class="hs-identifier hs-type">freshTypeIndex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#State"><span class="hs-identifier hs-type">State</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#HieTypeState"><span class="hs-identifier hs-type">HieTypeState</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TypeIndex"><span class="hs-identifier hs-type">TypeIndex</span></a></span><span>
</span><span id="line-185"></span><span id="freshTypeIndex"><span class="annot"><span class="annottext">freshTypeIndex :: State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#freshTypeIndex"><span class="hs-identifier hs-var hs-var">freshTypeIndex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-186"></span><span>  </span><span id="local-6989586621680999374"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999374"><span class="hs-identifier hs-var">index</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(HieTypeState -&gt; Int) -&gt; State HieTypeState Int
forall (m :: * -&gt; *) s a. Monad m =&gt; (s -&gt; a) -&gt; StateT s m a
</span><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#gets"><span class="hs-identifier hs-var">gets</span></a></span><span> </span><span class="annot"><span class="annottext">HieTypeState -&gt; Int
</span><a href="GHC.Iface.Ext.Utils.html#freshIndex"><span class="hs-identifier hs-var hs-var">freshIndex</span></a></span><span>
</span><span id="line-187"></span><span>  </span><span class="annot"><span class="annottext">(HieTypeState -&gt; HieTypeState) -&gt; StateT HieTypeState Identity ()
forall (m :: * -&gt; *) s. Monad m =&gt; (s -&gt; s) -&gt; StateT s m ()
</span><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#modify%27"><span class="hs-identifier hs-var">modify'</span></a></span><span> </span><span class="annot"><span class="annottext">((HieTypeState -&gt; HieTypeState) -&gt; StateT HieTypeState Identity ())
-&gt; (HieTypeState -&gt; HieTypeState)
-&gt; StateT HieTypeState Identity ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680999371"><span class="annot"><span class="annottext">HieTypeState
</span><a href="#local-6989586621680999371"><span class="hs-identifier hs-var">hts</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HieTypeState
</span><a href="#local-6989586621680999371"><span class="hs-identifier hs-var">hts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">freshIndex :: Int
</span><a href="GHC.Iface.Ext.Utils.html#freshIndex"><span class="hs-identifier hs-var">freshIndex</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999374"><span class="hs-identifier hs-var">index</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-188"></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; State HieTypeState Int
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999374"><span class="hs-identifier hs-var">index</span></a></span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#compressTypes"><span class="hs-identifier hs-type">compressTypes</span></a></span><span>
</span><span id="line-191"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieASTs"><span class="hs-identifier hs-type">HieASTs</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-192"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieASTs"><span class="hs-identifier hs-type">HieASTs</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TypeIndex"><span class="hs-identifier hs-type">TypeIndex</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Arr.html#Array"><span class="hs-identifier hs-type">A.Array</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TypeIndex"><span class="hs-identifier hs-type">TypeIndex</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieTypeFlat"><span class="hs-identifier hs-type">HieTypeFlat</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-193"></span><span id="compressTypes"><span class="annot"><span class="annottext">compressTypes :: HieASTs Type -&gt; (HieASTs Int, Array Int HieTypeFlat)
</span><a href="GHC.Iface.Ext.Utils.html#compressTypes"><span class="hs-identifier hs-var hs-var">compressTypes</span></a></span></span><span> </span><span id="local-6989586621680999368"><span class="annot"><span class="annottext">HieASTs Type
</span><a href="#local-6989586621680999368"><span class="hs-identifier hs-var">asts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieASTs Int
</span><a href="#local-6989586621680999367"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Array Int HieTypeFlat
</span><a href="#local-6989586621680999366"><span class="hs-identifier hs-var">arr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-195"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680999367"><span class="annot"><span class="annottext">HieASTs Int
</span><a href="#local-6989586621680999367"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#HTS"><span class="hs-identifier hs-type">HTS</span></a></span><span> </span><span class="annot"><span class="annottext">TypeMap Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680999356"><span class="annot"><span class="annottext">IntMap HieTypeFlat
</span><a href="#local-6989586621680999356"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621680999355"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999355"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(State HieTypeState (HieASTs Int)
 -&gt; HieTypeState -&gt; (HieASTs Int, HieTypeState))
-&gt; HieTypeState
-&gt; State HieTypeState (HieASTs Int)
-&gt; (HieASTs Int, HieTypeState)
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">State HieTypeState (HieASTs Int)
-&gt; HieTypeState -&gt; (HieASTs Int, HieTypeState)
forall s a. State s a -&gt; s -&gt; (a, s)
</span><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#runState"><span class="hs-identifier hs-var">runState</span></a></span><span> </span><span class="annot"><span class="annottext">HieTypeState
</span><a href="GHC.Iface.Ext.Utils.html#initialHTS"><span class="hs-identifier hs-var">initialHTS</span></a></span><span> </span><span class="annot"><span class="annottext">(State HieTypeState (HieASTs Int) -&gt; (HieASTs Int, HieTypeState))
-&gt; State HieTypeState (HieASTs Int) -&gt; (HieASTs Int, HieTypeState)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-196"></span><span>      </span><span class="annot"><span class="annottext">HieASTs Type
-&gt; (Type -&gt; State HieTypeState Int)
-&gt; State HieTypeState (HieASTs Int)
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#for"><span class="hs-identifier hs-var">for</span></a></span><span> </span><span class="annot"><span class="annottext">HieASTs Type
</span><a href="#local-6989586621680999368"><span class="hs-identifier hs-var">asts</span></a></span><span> </span><span class="annot"><span class="annottext">((Type -&gt; State HieTypeState Int)
 -&gt; State HieTypeState (HieASTs Int))
-&gt; (Type -&gt; State HieTypeState Int)
-&gt; State HieTypeState (HieASTs Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621680999353"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999353"><span class="hs-identifier hs-var">typ</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-197"></span><span>        </span><span id="local-6989586621680999352"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999352"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var">getTypeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999353"><span class="hs-identifier hs-var">typ</span></a></span><span>
</span><span id="line-198"></span><span>        </span><span class="annot"><span class="annottext">Int -&gt; State HieTypeState Int
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999352"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-199"></span><span>    </span><span id="local-6989586621680999366"><span class="annot"><span class="annottext">arr :: Array Int HieTypeFlat
</span><a href="#local-6989586621680999366"><span class="hs-identifier hs-var hs-var">arr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; [(Int, HieTypeFlat)] -&gt; Array Int HieTypeFlat
forall i e. Ix i =&gt; (i, i) -&gt; [(i, e)] -&gt; Array i e
</span><a href="../../base/src/GHC.Arr.html#array"><span class="hs-identifier hs-var">A.array</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999355"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IntMap HieTypeFlat -&gt; [(Int, HieTypeFlat)]
forall a. IntMap a -&gt; [(Int, a)]
</span><a href="../../containers/src/Data.IntMap.Internal.html#toList"><span class="hs-identifier hs-var">IM.toList</span></a></span><span> </span><span class="annot"><span class="annottext">IntMap HieTypeFlat
</span><a href="#local-6989586621680999356"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#recoverFullType"><span class="hs-identifier hs-type">recoverFullType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TypeIndex"><span class="hs-identifier hs-type">TypeIndex</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Arr.html#Array"><span class="hs-identifier hs-type">A.Array</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TypeIndex"><span class="hs-identifier hs-type">TypeIndex</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieTypeFlat"><span class="hs-identifier hs-type">HieTypeFlat</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieTypeFix"><span class="hs-identifier hs-type">HieTypeFix</span></a></span><span>
</span><span id="line-202"></span><span id="recoverFullType"><span class="annot"><span class="annottext">recoverFullType :: Int -&gt; Array Int HieTypeFlat -&gt; HieTypeFix
</span><a href="GHC.Iface.Ext.Utils.html#recoverFullType"><span class="hs-identifier hs-var hs-var">recoverFullType</span></a></span></span><span> </span><span id="local-6989586621680999342"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999342"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621680999341"><span class="annot"><span class="annottext">Array Int HieTypeFlat
</span><a href="#local-6989586621680999341"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; HieTypeFix
</span><a href="#local-6989586621680999340"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999342"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-203"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-204"></span><span>    </span><span id="local-6989586621680999340"><span class="annot"><span class="annottext">go :: Int -&gt; HieTypeFix
</span><a href="#local-6989586621680999340"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621680999337"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999337"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieType HieTypeFix -&gt; HieTypeFix
</span><a href="GHC.Iface.Ext.Types.html#Roll"><span class="hs-identifier hs-var">Roll</span></a></span><span> </span><span class="annot"><span class="annottext">(HieType HieTypeFix -&gt; HieTypeFix)
-&gt; HieType HieTypeFix -&gt; HieTypeFix
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; HieTypeFix) -&gt; HieTypeFlat -&gt; HieType HieTypeFix
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; HieTypeFix
</span><a href="#local-6989586621680999340"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Array Int HieTypeFlat
</span><a href="#local-6989586621680999341"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Array Int HieTypeFlat -&gt; Int -&gt; HieTypeFlat
forall i e. Ix i =&gt; Array i e -&gt; i -&gt; e
</span><a href="../../base/src/GHC.Arr.html#%21"><span class="hs-operator hs-var">A.!</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999337"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-205"></span><span>
</span><span id="line-206"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-type">getTypeIndex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#State"><span class="hs-identifier hs-type">State</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#HieTypeState"><span class="hs-identifier hs-type">HieTypeState</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TypeIndex"><span class="hs-identifier hs-type">TypeIndex</span></a></span><span>
</span><span id="line-207"></span><span id="getTypeIndex"><span class="annot"><span class="annottext">getTypeIndex :: Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var hs-var">getTypeIndex</span></a></span></span><span> </span><span id="local-6989586621680999335"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999335"><span class="hs-identifier hs-var">t</span></a></span></span><span>
</span><span id="line-208"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-209"></span><span>      </span><span id="local-6989586621680999334"><span class="annot"><span class="annottext">TypeMap Int
</span><a href="#local-6989586621680999334"><span class="hs-identifier hs-var">tm</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(HieTypeState -&gt; TypeMap Int)
-&gt; StateT HieTypeState Identity (TypeMap Int)
forall (m :: * -&gt; *) s a. Monad m =&gt; (s -&gt; a) -&gt; StateT s m a
</span><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#gets"><span class="hs-identifier hs-var">gets</span></a></span><span> </span><span class="annot"><span class="annottext">HieTypeState -&gt; TypeMap Int
</span><a href="GHC.Iface.Ext.Utils.html#tyMap"><span class="hs-identifier hs-var hs-var">tyMap</span></a></span><span>
</span><span id="line-210"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TypeMap Int -&gt; Type -&gt; Maybe Int
forall a. TypeMap a -&gt; Type -&gt; Maybe a
</span><a href="GHC.Core.Map.html#lookupTypeMap"><span class="hs-identifier hs-var">lookupTypeMap</span></a></span><span> </span><span class="annot"><span class="annottext">TypeMap Int
</span><a href="#local-6989586621680999334"><span class="hs-identifier hs-var">tm</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999335"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-211"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680999332"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999332"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; State HieTypeState Int
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999332"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-212"></span><span>        </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-213"></span><span>          </span><span id="local-6989586621680999331"><span class="annot"><span class="annottext">HieTypeFlat
</span><a href="#local-6989586621680999331"><span class="hs-identifier hs-var">ht</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; StateT HieTypeState Identity HieTypeFlat
</span><a href="#local-6989586621680999330"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999335"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-214"></span><span>          </span><span class="annot"><span class="annottext">Type -&gt; HieTypeFlat -&gt; State HieTypeState Int
</span><a href="#local-6989586621680999329"><span class="hs-identifier hs-var">extendHTS</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999335"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">HieTypeFlat
</span><a href="#local-6989586621680999331"><span class="hs-identifier hs-var">ht</span></a></span><span>
</span><span id="line-215"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-216"></span><span>    </span><span id="local-6989586621680999329"><span class="annot"><span class="annottext">extendHTS :: Type -&gt; HieTypeFlat -&gt; State HieTypeState Int
</span><a href="#local-6989586621680999329"><span class="hs-identifier hs-var hs-var">extendHTS</span></a></span></span><span> </span><span id="local-6989586621680999323"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999323"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621680999322"><span class="annot"><span class="annottext">HieTypeFlat
</span><a href="#local-6989586621680999322"><span class="hs-identifier hs-var">ht</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-217"></span><span>      </span><span id="local-6989586621680999321"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999321"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#freshTypeIndex"><span class="hs-identifier hs-var">freshTypeIndex</span></a></span><span>
</span><span id="line-218"></span><span>      </span><span class="annot"><span class="annottext">(HieTypeState -&gt; HieTypeState) -&gt; StateT HieTypeState Identity ()
forall (m :: * -&gt; *) s. Monad m =&gt; (s -&gt; s) -&gt; StateT s m ()
</span><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#modify%27"><span class="hs-identifier hs-var">modify'</span></a></span><span> </span><span class="annot"><span class="annottext">((HieTypeState -&gt; HieTypeState) -&gt; StateT HieTypeState Identity ())
-&gt; (HieTypeState -&gt; HieTypeState)
-&gt; StateT HieTypeState Identity ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#HTS"><span class="hs-identifier hs-type">HTS</span></a></span><span> </span><span id="local-6989586621680999320"><span class="annot"><span class="annottext">TypeMap Int
</span><a href="#local-6989586621680999320"><span class="hs-identifier hs-var">tm</span></a></span></span><span> </span><span id="local-6989586621680999319"><span class="annot"><span class="annottext">IntMap HieTypeFlat
</span><a href="#local-6989586621680999319"><span class="hs-identifier hs-var">tt</span></a></span></span><span> </span><span id="local-6989586621680999318"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999318"><span class="hs-identifier hs-var">fi</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-219"></span><span>        </span><span class="annot"><span class="annottext">TypeMap Int -&gt; IntMap HieTypeFlat -&gt; Int -&gt; HieTypeState
</span><a href="GHC.Iface.Ext.Utils.html#HTS"><span class="hs-identifier hs-var">HTS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TypeMap Int -&gt; Type -&gt; Int -&gt; TypeMap Int
forall a. TypeMap a -&gt; Type -&gt; a -&gt; TypeMap a
</span><a href="GHC.Core.Map.html#extendTypeMap"><span class="hs-identifier hs-var">extendTypeMap</span></a></span><span> </span><span class="annot"><span class="annottext">TypeMap Int
</span><a href="#local-6989586621680999320"><span class="hs-identifier hs-var">tm</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999323"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999321"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; HieTypeFlat -&gt; IntMap HieTypeFlat -&gt; IntMap HieTypeFlat
forall a. Int -&gt; a -&gt; IntMap a -&gt; IntMap a
</span><a href="../../containers/src/Data.IntMap.Strict.Internal.html#insert"><span class="hs-identifier hs-var">IM.insert</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999321"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">HieTypeFlat
</span><a href="#local-6989586621680999322"><span class="hs-identifier hs-var">ht</span></a></span><span> </span><span class="annot"><span class="annottext">IntMap HieTypeFlat
</span><a href="#local-6989586621680999319"><span class="hs-identifier hs-var">tt</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999318"><span class="hs-identifier hs-var">fi</span></a></span><span>
</span><span id="line-220"></span><span>      </span><span class="annot"><span class="annottext">Int -&gt; State HieTypeState Int
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999321"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-221"></span><span>
</span><span id="line-222"></span><span>    </span><span id="local-6989586621680999330"><span class="annot"><span class="annottext">go :: Type -&gt; StateT HieTypeState Identity HieTypeFlat
</span><a href="#local-6989586621680999330"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyVarTy"><span class="hs-identifier hs-type">TyVarTy</span></a></span><span> </span><span id="local-6989586621680999290"><span class="annot"><span class="annottext">TyCoVar
</span><a href="#local-6989586621680999290"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat)
-&gt; HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; HieTypeFlat
forall a. Name -&gt; HieType a
</span><a href="GHC.Iface.Ext.Types.html#HTyVarTy"><span class="hs-identifier hs-var">HTyVarTy</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; HieTypeFlat) -&gt; Name -&gt; HieTypeFlat
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TyCoVar -&gt; Name
</span><a href="GHC.Types.Var.html#varName"><span class="hs-identifier hs-var hs-var">varName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCoVar
</span><a href="#local-6989586621680999290"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-223"></span><span>    </span><span class="annot"><a href="#local-6989586621680999330"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680999288"><span class="annot"><span class="annottext">ty :: Type
</span><a href="#local-6989586621680999288"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#AppTy"><span class="hs-identifier hs-type">AppTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-224"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680999286"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999286"><span class="hs-identifier hs-var">head</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680999285"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999285"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; (Type, [Type])
</span><a href="GHC.Core.Type.html#splitAppTys"><span class="hs-identifier hs-var">splitAppTys</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999288"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-225"></span><span>          </span><span id="local-6989586621680999281"><span class="annot"><span class="annottext">visArgs :: HieArgs Type
</span><a href="#local-6989586621680999281"><span class="hs-identifier hs-var hs-var">visArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Bool, Type)] -&gt; HieArgs Type
forall a. [(Bool, a)] -&gt; HieArgs a
</span><a href="GHC.Iface.Ext.Types.html#HieArgs"><span class="hs-identifier hs-var">HieArgs</span></a></span><span> </span><span class="annot"><span class="annottext">([(Bool, Type)] -&gt; HieArgs Type) -&gt; [(Bool, Type)] -&gt; HieArgs Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; [Type] -&gt; [(Bool, Type)]
</span><a href="GHC.Iface.Ext.Utils.html#resolveVisibility"><span class="hs-identifier hs-var">resolveVisibility</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Type
Type -&gt; Type
</span><a href="GHC.Core.Type.html#typeKind"><span class="hs-identifier hs-var">typeKind</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999286"><span class="hs-identifier hs-var">head</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999285"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-226"></span><span>      </span><span id="local-6989586621680999279"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999279"><span class="hs-identifier hs-var">ai</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var">getTypeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999286"><span class="hs-identifier hs-var">head</span></a></span><span>
</span><span id="line-227"></span><span>      </span><span id="local-6989586621680999278"><span class="annot"><span class="annottext">HieArgs Int
</span><a href="#local-6989586621680999278"><span class="hs-identifier hs-var">argsi</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; State HieTypeState Int)
-&gt; HieArgs Type -&gt; StateT HieTypeState Identity (HieArgs Int)
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var">getTypeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">HieArgs Type
</span><a href="#local-6989586621680999281"><span class="hs-identifier hs-var">visArgs</span></a></span><span>
</span><span id="line-228"></span><span>      </span><span class="annot"><span class="annottext">HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat)
-&gt; HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; HieArgs Int -&gt; HieTypeFlat
forall a. a -&gt; HieArgs a -&gt; HieType a
</span><a href="GHC.Iface.Ext.Types.html#HAppTy"><span class="hs-identifier hs-var">HAppTy</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999279"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">HieArgs Int
</span><a href="#local-6989586621680999278"><span class="hs-identifier hs-var">argsi</span></a></span><span>
</span><span id="line-229"></span><span>    </span><span class="annot"><a href="#local-6989586621680999330"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyConApp"><span class="hs-identifier hs-type">TyConApp</span></a></span><span> </span><span id="local-6989586621680999275"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680999275"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621680999274"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999274"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-230"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680999273"><span class="annot"><span class="annottext">visArgs :: HieArgs Type
</span><a href="#local-6989586621680999273"><span class="hs-identifier hs-var hs-var">visArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Bool, Type)] -&gt; HieArgs Type
forall a. [(Bool, a)] -&gt; HieArgs a
</span><a href="GHC.Iface.Ext.Types.html#HieArgs"><span class="hs-identifier hs-var">HieArgs</span></a></span><span> </span><span class="annot"><span class="annottext">([(Bool, Type)] -&gt; HieArgs Type) -&gt; [(Bool, Type)] -&gt; HieArgs Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; [Type] -&gt; [(Bool, Type)]
</span><a href="GHC.Iface.Ext.Utils.html#resolveVisibility"><span class="hs-identifier hs-var">resolveVisibility</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; Type
</span><a href="GHC.Core.TyCon.html#tyConKind"><span class="hs-identifier hs-var hs-var">tyConKind</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680999275"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999274"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-231"></span><span>      </span><span id="local-6989586621680999271"><span class="annot"><span class="annottext">HieArgs Int
</span><a href="#local-6989586621680999271"><span class="hs-identifier hs-var">is</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Type -&gt; State HieTypeState Int)
-&gt; HieArgs Type -&gt; StateT HieTypeState Identity (HieArgs Int)
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var">getTypeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">HieArgs Type
</span><a href="#local-6989586621680999273"><span class="hs-identifier hs-var">visArgs</span></a></span><span>
</span><span id="line-232"></span><span>      </span><span class="annot"><span class="annottext">HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat)
-&gt; HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTyCon -&gt; HieArgs Int -&gt; HieTypeFlat
forall a. IfaceTyCon -&gt; HieArgs a -&gt; HieType a
</span><a href="GHC.Iface.Ext.Types.html#HTyConApp"><span class="hs-identifier hs-var">HTyConApp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; IfaceTyCon
</span><a href="GHC.CoreToIface.html#toIfaceTyCon"><span class="hs-identifier hs-var">toIfaceTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621680999275"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">HieArgs Int
</span><a href="#local-6989586621680999271"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-233"></span><span>    </span><span class="annot"><a href="#local-6989586621680999330"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ForAllTy"><span class="hs-identifier hs-type">ForAllTy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-type">Bndr</span></a></span><span> </span><span id="local-6989586621680999269"><span class="annot"><span class="annottext">TyCoVar
</span><a href="#local-6989586621680999269"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621680999268"><span class="annot"><span class="annottext">ArgFlag
</span><a href="#local-6989586621680999268"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680999267"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999267"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-234"></span><span>      </span><span id="local-6989586621680999266"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999266"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var">getTypeIndex</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCoVar -&gt; Type
</span><a href="GHC.Types.Var.html#varType"><span class="hs-identifier hs-var hs-var">varType</span></a></span><span> </span><span class="annot"><span class="annottext">TyCoVar
</span><a href="#local-6989586621680999269"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-235"></span><span>      </span><span id="local-6989586621680999264"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999264"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var">getTypeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999267"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-236"></span><span>      </span><span class="annot"><span class="annottext">HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat)
-&gt; HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((Name, Int), ArgFlag) -&gt; Int -&gt; HieTypeFlat
forall a. ((Name, a), ArgFlag) -&gt; a -&gt; HieType a
</span><a href="GHC.Iface.Ext.Types.html#HForAllTy"><span class="hs-identifier hs-var">HForAllTy</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCoVar -&gt; Name
</span><a href="GHC.Types.Var.html#varName"><span class="hs-identifier hs-var hs-var">varName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCoVar
</span><a href="#local-6989586621680999269"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999266"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">ArgFlag
</span><a href="#local-6989586621680999268"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999264"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-237"></span><span>    </span><span class="annot"><a href="#local-6989586621680999330"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#FunTy"><span class="hs-identifier hs-type">FunTy</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ft_af :: Type -&gt; AnonArgFlag
</span><a href="GHC.Core.TyCo.Rep.html#ft_af"><span class="hs-identifier hs-var">ft_af</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680999262"><span class="annot"><span class="annottext">AnonArgFlag
</span><a href="#local-6989586621680999262"><span class="hs-identifier hs-var">af</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ft_mult :: Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#ft_mult"><span class="hs-identifier hs-var">ft_mult</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680999260"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999260"><span class="hs-identifier hs-var">w</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ft_arg :: Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#ft_arg"><span class="hs-identifier hs-var">ft_arg</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680999258"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999258"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ft_res :: Type -&gt; Type
</span><a href="GHC.Core.TyCo.Rep.html#ft_res"><span class="hs-identifier hs-var">ft_res</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680999257"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999257"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-238"></span><span>      </span><span id="local-6989586621680999256"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999256"><span class="hs-identifier hs-var">ai</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var">getTypeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999258"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-239"></span><span>      </span><span id="local-6989586621680999255"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999255"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var">getTypeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999257"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-240"></span><span>      </span><span id="local-6989586621680999254"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999254"><span class="hs-identifier hs-var">wi</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var">getTypeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999260"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-241"></span><span>      </span><span class="annot"><span class="annottext">HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat)
-&gt; HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">AnonArgFlag
</span><a href="#local-6989586621680999262"><span class="hs-identifier hs-var">af</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-242"></span><span>                 </span><span class="annot"><span class="annottext">AnonArgFlag
</span><a href="GHC.Types.Var.html#InvisArg"><span class="hs-identifier hs-var">InvisArg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999260"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="GHC.Core.Type.html#Many"><span class="hs-identifier hs-var">Many</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; HieTypeFlat
forall a. a -&gt; a -&gt; HieType a
</span><a href="GHC.Iface.Ext.Types.html#HQualTy"><span class="hs-identifier hs-var">HQualTy</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999256"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999255"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; HieTypeFlat
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Unexpected non-unrestricted predicate&quot;</span></span><span>
</span><span id="line-243"></span><span>                 </span><span class="annot"><span class="annottext">AnonArgFlag
</span><a href="GHC.Types.Var.html#VisArg"><span class="hs-identifier hs-var">VisArg</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int -&gt; HieTypeFlat
forall a. a -&gt; a -&gt; a -&gt; HieType a
</span><a href="GHC.Iface.Ext.Types.html#HFunTy"><span class="hs-identifier hs-var">HFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999254"><span class="hs-identifier hs-var">wi</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999256"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999255"><span class="hs-identifier hs-var">bi</span></a></span><span>
</span><span id="line-244"></span><span>    </span><span class="annot"><a href="#local-6989586621680999330"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#LitTy"><span class="hs-identifier hs-type">LitTy</span></a></span><span> </span><span id="local-6989586621680999250"><span class="annot"><span class="annottext">TyLit
</span><a href="#local-6989586621680999250"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat)
-&gt; HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceTyLit -&gt; HieTypeFlat
forall a. IfaceTyLit -&gt; HieType a
</span><a href="GHC.Iface.Ext.Types.html#HLitTy"><span class="hs-identifier hs-var">HLitTy</span></a></span><span> </span><span class="annot"><span class="annottext">(IfaceTyLit -&gt; HieTypeFlat) -&gt; IfaceTyLit -&gt; HieTypeFlat
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TyLit -&gt; IfaceTyLit
</span><a href="GHC.CoreToIface.html#toIfaceTyLit"><span class="hs-identifier hs-var">toIfaceTyLit</span></a></span><span> </span><span class="annot"><span class="annottext">TyLit
</span><a href="#local-6989586621680999250"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-245"></span><span>    </span><span class="annot"><a href="#local-6989586621680999330"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#CastTy"><span class="hs-identifier hs-type">CastTy</span></a></span><span> </span><span id="local-6989586621680999247"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999247"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="annot"><span class="annottext">KindCoercion
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-246"></span><span>      </span><span id="local-6989586621680999246"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999246"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Type -&gt; State HieTypeState Int
</span><a href="GHC.Iface.Ext.Utils.html#getTypeIndex"><span class="hs-identifier hs-var">getTypeIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999247"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-247"></span><span>      </span><span class="annot"><span class="annottext">HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat)
-&gt; HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; HieTypeFlat
forall a. a -&gt; HieType a
</span><a href="GHC.Iface.Ext.Types.html#HCastTy"><span class="hs-identifier hs-var">HCastTy</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680999246"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-248"></span><span>    </span><span class="annot"><a href="#local-6989586621680999330"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#CoercionTy"><span class="hs-identifier hs-type">CoercionTy</span></a></span><span> </span><span class="annot"><span class="annottext">KindCoercion
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieTypeFlat -&gt; StateT HieTypeState Identity HieTypeFlat
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">HieTypeFlat
forall a. HieType a
</span><a href="GHC.Iface.Ext.Types.html#HCoercionTy"><span class="hs-identifier hs-var">HCoercionTy</span></a></span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span id="local-6989586621680999886"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#resolveTyVarScopes"><span class="hs-identifier hs-type">resolveTyVarScopes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">M.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999886"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">M.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999886"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-251"></span><span id="resolveTyVarScopes"><span class="annot"><span class="annottext">resolveTyVarScopes :: forall a. Map FastString (HieAST a) -&gt; Map FastString (HieAST a)
</span><a href="GHC.Iface.Ext.Utils.html#resolveTyVarScopes"><span class="hs-identifier hs-var hs-var">resolveTyVarScopes</span></a></span></span><span> </span><span id="local-6989586621680999243"><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999243"><span class="hs-identifier hs-var">asts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HieAST a -&gt; HieAST a)
-&gt; Map FastString (HieAST a) -&gt; Map FastString (HieAST a)
forall a b k. (a -&gt; b) -&gt; Map k a -&gt; Map k b
</span><a href="../../containers/src/Data.Map.Internal.html#map"><span class="hs-identifier hs-var">M.map</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; HieAST a
</span><a href="#local-6989586621680999241"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999243"><span class="hs-identifier hs-var">asts</span></a></span><span>
</span><span id="line-252"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-253"></span><span>    </span><span id="local-6989586621680999241"><span class="annot"><span class="annottext">go :: HieAST a -&gt; HieAST a
</span><a href="#local-6989586621680999241"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621680999240"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999240"><span class="hs-identifier hs-var">ast</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Map FastString (HieAST a) -&gt; HieAST a
forall a. HieAST a -&gt; Map FastString (HieAST a) -&gt; HieAST a
</span><a href="GHC.Iface.Ext.Utils.html#resolveTyVarScopeLocal"><span class="hs-identifier hs-var">resolveTyVarScopeLocal</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999240"><span class="hs-identifier hs-var">ast</span></a></span><span> </span><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999243"><span class="hs-identifier hs-var">asts</span></a></span><span>
</span><span id="line-254"></span><span>
</span><span id="line-255"></span><span id="local-6989586621680999881"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#resolveTyVarScopeLocal"><span class="hs-identifier hs-type">resolveTyVarScopeLocal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999881"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">M.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999881"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999881"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-256"></span><span id="resolveTyVarScopeLocal"><span class="annot"><span class="annottext">resolveTyVarScopeLocal :: forall a. HieAST a -&gt; Map FastString (HieAST a) -&gt; HieAST a
</span><a href="GHC.Iface.Ext.Utils.html#resolveTyVarScopeLocal"><span class="hs-identifier hs-var hs-var">resolveTyVarScopeLocal</span></a></span></span><span> </span><span id="local-6989586621680999238"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999238"><span class="hs-identifier hs-var">ast</span></a></span></span><span> </span><span id="local-6989586621680999237"><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999237"><span class="hs-identifier hs-var">asts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; HieAST a
forall {a}. HieAST a -&gt; HieAST a
</span><a href="#local-6989586621680999236"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999238"><span class="hs-identifier hs-var">ast</span></a></span><span>
</span><span id="line-257"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-258"></span><span>    </span><span id="local-6989586621680999233"><span class="annot"><span class="annottext">resolveNameScope :: IdentifierDetails a -&gt; IdentifierDetails a
</span><a href="#local-6989586621680999233"><span class="hs-identifier hs-var hs-var">resolveNameScope</span></a></span></span><span> </span><span id="local-6989586621680999232"><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999232"><span class="hs-identifier hs-var">dets</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999232"><span class="hs-identifier hs-var">dets</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">identInfo :: Set ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#identInfo"><span class="hs-identifier hs-var">identInfo</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-259"></span><span>      </span><span class="annot"><span class="annottext">(ContextInfo -&gt; ContextInfo) -&gt; Set ContextInfo -&gt; Set ContextInfo
forall b a. Ord b =&gt; (a -&gt; b) -&gt; Set a -&gt; Set b
</span><a href="../../containers/src/Data.Set.Internal.html#map"><span class="hs-identifier hs-var">S.map</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo -&gt; ContextInfo
</span><a href="#local-6989586621680999230"><span class="hs-identifier hs-var">resolveScope</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; Set ContextInfo
forall a. IdentifierDetails a -&gt; Set ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#identInfo"><span class="hs-identifier hs-var hs-var">identInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999232"><span class="hs-identifier hs-var">dets</span></a></span><span class="hs-special">)</span><span class="hs-special">}</span><span>
</span><span id="line-260"></span><span>    </span><span id="local-6989586621680999230"><span class="annot"><span class="annottext">resolveScope :: ContextInfo -&gt; ContextInfo
</span><a href="#local-6989586621680999230"><span class="hs-identifier hs-var hs-var">resolveScope</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TyVarBind"><span class="hs-identifier hs-type">TyVarBind</span></a></span><span> </span><span id="local-6989586621680999228"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999228"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#UnresolvedScope"><span class="hs-identifier hs-type">UnresolvedScope</span></a></span><span> </span><span id="local-6989586621680999226"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680999226"><span class="hs-identifier hs-var">names</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Span
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-261"></span><span>      </span><span class="annot"><span class="annottext">Scope -&gt; TyVarScope -&gt; ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#TyVarBind"><span class="hs-identifier hs-var">TyVarBind</span></a></span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999228"><span class="hs-identifier hs-var">sc</span></a></span><span> </span><span class="annot"><span class="annottext">(TyVarScope -&gt; ContextInfo) -&gt; TyVarScope -&gt; ContextInfo
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Scope] -&gt; TyVarScope
</span><a href="GHC.Iface.Ext.Types.html#ResolvedScopes"><span class="hs-identifier hs-var">ResolvedScopes</span></a></span><span>
</span><span id="line-262"></span><span>        </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Span -&gt; Scope
</span><a href="GHC.Iface.Ext.Types.html#LocalScope"><span class="hs-identifier hs-var">LocalScope</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999223"><span class="hs-identifier hs-var">binding</span></a></span><span>
</span><span id="line-263"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680999222"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999222"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680999226"><span class="hs-identifier hs-var">names</span></a></span><span>
</span><span id="line-264"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680999223"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999223"><span class="hs-identifier hs-var">binding</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name -&gt; Map FastString (HieAST a) -&gt; Maybe Span
forall a. Name -&gt; Map FastString (HieAST a) -&gt; Maybe Span
</span><a href="GHC.Iface.Ext.Utils.html#getNameBinding"><span class="hs-identifier hs-var">getNameBinding</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999222"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999237"><span class="hs-identifier hs-var">asts</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-265"></span><span>        </span><span class="hs-special">]</span><span>
</span><span id="line-266"></span><span>    </span><span class="annot"><a href="#local-6989586621680999230"><span class="hs-identifier hs-var">resolveScope</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TyVarBind"><span class="hs-identifier hs-type">TyVarBind</span></a></span><span> </span><span id="local-6989586621680999220"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999220"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#UnresolvedScope"><span class="hs-identifier hs-type">UnresolvedScope</span></a></span><span> </span><span id="local-6989586621680999219"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680999219"><span class="hs-identifier hs-var">names</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680999218"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999218"><span class="hs-identifier hs-var">sp</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-267"></span><span>      </span><span class="annot"><span class="annottext">Scope -&gt; TyVarScope -&gt; ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#TyVarBind"><span class="hs-identifier hs-var">TyVarBind</span></a></span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999220"><span class="hs-identifier hs-var">sc</span></a></span><span> </span><span class="annot"><span class="annottext">(TyVarScope -&gt; ContextInfo) -&gt; TyVarScope -&gt; ContextInfo
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Scope] -&gt; TyVarScope
</span><a href="GHC.Iface.Ext.Types.html#ResolvedScopes"><span class="hs-identifier hs-var">ResolvedScopes</span></a></span><span>
</span><span id="line-268"></span><span>        </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Span -&gt; Scope
</span><a href="GHC.Iface.Ext.Types.html#LocalScope"><span class="hs-identifier hs-var">LocalScope</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999217"><span class="hs-identifier hs-var">binding</span></a></span><span>
</span><span id="line-269"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621680999216"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999216"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621680999219"><span class="hs-identifier hs-var">names</span></a></span><span>
</span><span id="line-270"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680999217"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999217"><span class="hs-identifier hs-var">binding</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Name -&gt; Span -&gt; Map FastString (HieAST a) -&gt; Maybe Span
forall a. Name -&gt; Span -&gt; Map FastString (HieAST a) -&gt; Maybe Span
</span><a href="GHC.Iface.Ext.Utils.html#getNameBindingInClass"><span class="hs-identifier hs-var">getNameBindingInClass</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999216"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999218"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999237"><span class="hs-identifier hs-var">asts</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-271"></span><span>        </span><span class="hs-special">]</span><span>
</span><span id="line-272"></span><span>    </span><span class="annot"><a href="#local-6989586621680999230"><span class="hs-identifier hs-var">resolveScope</span></a></span><span> </span><span id="local-6989586621680999214"><span class="annot"><span class="annottext">ContextInfo
</span><a href="#local-6989586621680999214"><span class="hs-identifier hs-var">scope</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><a href="#local-6989586621680999214"><span class="hs-identifier hs-var">scope</span></a></span><span>
</span><span id="line-273"></span><span>    </span><span id="local-6989586621680999236"><span class="annot"><span class="annottext">go :: HieAST a -&gt; HieAST a
</span><a href="#local-6989586621680999236"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span id="local-6989586621680999212"><span class="annot"><span class="annottext">SourcedNodeInfo a
</span><a href="#local-6989586621680999212"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621680999211"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999211"><span class="hs-identifier hs-var">span</span></a></span></span><span> </span><span id="local-6989586621680999210"><span class="annot"><span class="annottext">[HieAST a]
</span><a href="#local-6989586621680999210"><span class="hs-identifier hs-var">children</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo a -&gt; Span -&gt; [HieAST a] -&gt; HieAST a
forall a. SourcedNodeInfo a -&gt; Span -&gt; [HieAST a] -&gt; HieAST a
</span><a href="GHC.Iface.Ext.Types.html#Node"><span class="hs-identifier hs-var">Node</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo a
</span><a href="#local-6989586621680999209"><span class="hs-identifier hs-var">info'</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999211"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="annot"><span class="annottext">([HieAST a] -&gt; HieAST a) -&gt; [HieAST a] -&gt; HieAST a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(HieAST a -&gt; HieAST a) -&gt; [HieAST a] -&gt; [HieAST a]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; HieAST a
</span><a href="#local-6989586621680999236"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST a]
</span><a href="#local-6989586621680999210"><span class="hs-identifier hs-var">children</span></a></span><span>
</span><span id="line-274"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-275"></span><span>        </span><span id="local-6989586621680999209"><span class="annot"><span class="annottext">info' :: SourcedNodeInfo a
</span><a href="#local-6989586621680999209"><span class="hs-identifier hs-var hs-var">info'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map NodeOrigin (NodeInfo a) -&gt; SourcedNodeInfo a
forall a. Map NodeOrigin (NodeInfo a) -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#SourcedNodeInfo"><span class="hs-identifier hs-var">SourcedNodeInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NodeInfo a -&gt; NodeInfo a
forall {a}. NodeInfo a -&gt; NodeInfo a
</span><a href="#local-6989586621680999206"><span class="hs-identifier hs-var">updateNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">(NodeInfo a -&gt; NodeInfo a)
-&gt; Map NodeOrigin (NodeInfo a) -&gt; Map NodeOrigin (NodeInfo a)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo a -&gt; Map NodeOrigin (NodeInfo a)
forall a. SourcedNodeInfo a -&gt; Map NodeOrigin (NodeInfo a)
</span><a href="GHC.Iface.Ext.Types.html#getSourcedNodeInfo"><span class="hs-identifier hs-var hs-var">getSourcedNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo a
</span><a href="#local-6989586621680999212"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span>        </span><span id="local-6989586621680999206"><span class="annot"><span class="annottext">updateNodeInfo :: NodeInfo a -&gt; NodeInfo a
</span><a href="#local-6989586621680999206"><span class="hs-identifier hs-var hs-var">updateNodeInfo</span></a></span></span><span> </span><span id="local-6989586621680999203"><span class="annot"><span class="annottext">NodeInfo a
</span><a href="#local-6989586621680999203"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NodeInfo a
</span><a href="#local-6989586621680999203"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">nodeIdentifiers :: NodeIdentifiers a
</span><a href="GHC.Iface.Ext.Types.html#nodeIdentifiers"><span class="hs-identifier hs-var">nodeIdentifiers</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NodeIdentifiers a
</span><a href="#local-6989586621680999201"><span class="hs-identifier hs-var">idents</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-277"></span><span>          </span><span class="hs-keyword">where</span><span>
</span><span id="line-278"></span><span>            </span><span id="local-6989586621680999201"><span class="annot"><span class="annottext">idents :: NodeIdentifiers a
</span><a href="#local-6989586621680999201"><span class="hs-identifier hs-var hs-var">idents</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdentifierDetails a -&gt; IdentifierDetails a)
-&gt; NodeIdentifiers a -&gt; NodeIdentifiers a
forall a b k. (a -&gt; b) -&gt; Map k a -&gt; Map k b
</span><a href="../../containers/src/Data.Map.Internal.html#map"><span class="hs-identifier hs-var">M.map</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; IdentifierDetails a
forall {a}. IdentifierDetails a -&gt; IdentifierDetails a
</span><a href="#local-6989586621680999233"><span class="hs-identifier hs-var">resolveNameScope</span></a></span><span> </span><span class="annot"><span class="annottext">(NodeIdentifiers a -&gt; NodeIdentifiers a)
-&gt; NodeIdentifiers a -&gt; NodeIdentifiers a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">NodeInfo a -&gt; NodeIdentifiers a
forall a. NodeInfo a -&gt; NodeIdentifiers a
</span><a href="GHC.Iface.Ext.Types.html#nodeIdentifiers"><span class="hs-identifier hs-var hs-var">nodeIdentifiers</span></a></span><span> </span><span class="annot"><span class="annottext">NodeInfo a
</span><a href="#local-6989586621680999203"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-279"></span><span>
</span><span id="line-280"></span><span id="local-6989586621680999874"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getNameBinding"><span class="hs-identifier hs-type">getNameBinding</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">M.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999874"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span></span><span>
</span><span id="line-281"></span><span id="getNameBinding"><span class="annot"><span class="annottext">getNameBinding :: forall a. Name -&gt; Map FastString (HieAST a) -&gt; Maybe Span
</span><a href="GHC.Iface.Ext.Utils.html#getNameBinding"><span class="hs-identifier hs-var hs-var">getNameBinding</span></a></span></span><span> </span><span id="local-6989586621680999199"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999199"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680999198"><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999198"><span class="hs-identifier hs-var">asts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-282"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Scope]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621680999197"><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999197"><span class="hs-identifier hs-var">msp</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Map FastString (HieAST a) -&gt; Maybe ([Scope], Maybe Span)
forall a.
Name -&gt; Map FastString (HieAST a) -&gt; Maybe ([Scope], Maybe Span)
</span><a href="GHC.Iface.Ext.Utils.html#getNameScopeAndBinding"><span class="hs-identifier hs-var">getNameScopeAndBinding</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999199"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999198"><span class="hs-identifier hs-var">asts</span></a></span><span>
</span><span id="line-283"></span><span>  </span><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999197"><span class="hs-identifier hs-var">msp</span></a></span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span id="local-6989586621680999864"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getNameScope"><span class="hs-identifier hs-type">getNameScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">M.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999864"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Scope"><span class="hs-identifier hs-type">Scope</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-286"></span><span id="getNameScope"><span class="annot"><span class="annottext">getNameScope :: forall a. Name -&gt; Map FastString (HieAST a) -&gt; Maybe [Scope]
</span><a href="GHC.Iface.Ext.Utils.html#getNameScope"><span class="hs-identifier hs-var hs-var">getNameScope</span></a></span></span><span> </span><span id="local-6989586621680999192"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999192"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680999191"><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999191"><span class="hs-identifier hs-var">asts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-287"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621680999190"><span class="annot"><span class="annottext">[Scope]
</span><a href="#local-6989586621680999190"><span class="hs-identifier hs-var">scopes</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Maybe Span
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Map FastString (HieAST a) -&gt; Maybe ([Scope], Maybe Span)
forall a.
Name -&gt; Map FastString (HieAST a) -&gt; Maybe ([Scope], Maybe Span)
</span><a href="GHC.Iface.Ext.Utils.html#getNameScopeAndBinding"><span class="hs-identifier hs-var">getNameScopeAndBinding</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999192"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999191"><span class="hs-identifier hs-var">asts</span></a></span><span>
</span><span id="line-288"></span><span>  </span><span class="annot"><span class="annottext">[Scope] -&gt; Maybe [Scope]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">[Scope]
</span><a href="#local-6989586621680999190"><span class="hs-identifier hs-var">scopes</span></a></span><span>
</span><span id="line-289"></span><span>
</span><span id="line-290"></span><span id="local-6989586621680999873"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getNameBindingInClass"><span class="hs-identifier hs-type">getNameBindingInClass</span></a></span><span>
</span><span id="line-291"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-292"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span>
</span><span id="line-293"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">M.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999873"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-294"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span></span><span>
</span><span id="line-295"></span><span id="getNameBindingInClass"><span class="annot"><span class="annottext">getNameBindingInClass :: forall a. Name -&gt; Span -&gt; Map FastString (HieAST a) -&gt; Maybe Span
</span><a href="GHC.Iface.Ext.Utils.html#getNameBindingInClass"><span class="hs-identifier hs-var hs-var">getNameBindingInClass</span></a></span></span><span> </span><span id="local-6989586621680999181"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999181"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680999180"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999180"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span id="local-6989586621680999179"><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999179"><span class="hs-identifier hs-var">asts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-296"></span><span>  </span><span id="local-6989586621680999178"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999178"><span class="hs-identifier hs-var">ast</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; Map FastString (HieAST a) -&gt; Maybe (HieAST a)
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">M.lookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; FastString
</span><a href="GHC.Types.SrcLoc.html#srcSpanFile"><span class="hs-identifier hs-var hs-var">srcSpanFile</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999180"><span class="hs-identifier hs-var">sp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999179"><span class="hs-identifier hs-var">asts</span></a></span><span>
</span><span id="line-297"></span><span>  </span><span class="annot"><span class="annottext">First Span -&gt; Maybe Span
forall a. First a -&gt; Maybe a
</span><a href="../../base/src/Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">(First Span -&gt; Maybe Span) -&gt; First Span -&gt; Maybe Span
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe Span -&gt; First Span) -&gt; [Maybe Span] -&gt; First Span
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Span -&gt; First Span
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">([Maybe Span] -&gt; First Span) -&gt; [Maybe Span] -&gt; First Span
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-298"></span><span>    </span><span id="local-6989586621680999176"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999176"><span class="hs-identifier hs-var">child</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; [HieAST a]
forall a. HieAST a -&gt; [HieAST a]
</span><a href="GHC.Iface.Ext.Utils.html#flattenAst"><span class="hs-identifier hs-var">flattenAst</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999178"><span class="hs-identifier hs-var">ast</span></a></span><span>
</span><span id="line-299"></span><span>    </span><span id="local-6989586621680999174"><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999174"><span class="hs-identifier hs-var">dets</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe (IdentifierDetails a) -&gt; [IdentifierDetails a]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span>
</span><span id="line-300"></span><span>      </span><span class="annot"><span class="annottext">(Maybe (IdentifierDetails a) -&gt; [IdentifierDetails a])
-&gt; Maybe (IdentifierDetails a) -&gt; [IdentifierDetails a]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Identifier
-&gt; Map Identifier (IdentifierDetails a)
-&gt; Maybe (IdentifierDetails a)
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">M.lookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Identifier
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999181"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Map Identifier (IdentifierDetails a)
 -&gt; Maybe (IdentifierDetails a))
-&gt; Map Identifier (IdentifierDetails a)
-&gt; Maybe (IdentifierDetails a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo a -&gt; Map Identifier (IdentifierDetails a)
forall a. SourcedNodeInfo a -&gt; NodeIdentifiers a
</span><a href="GHC.Iface.Ext.Utils.html#sourcedNodeIdents"><span class="hs-identifier hs-var">sourcedNodeIdents</span></a></span><span> </span><span class="annot"><span class="annottext">(SourcedNodeInfo a -&gt; Map Identifier (IdentifierDetails a))
-&gt; SourcedNodeInfo a -&gt; Map Identifier (IdentifierDetails a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; SourcedNodeInfo a
forall a. HieAST a -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#sourcedNodeInfo"><span class="hs-identifier hs-var hs-var">sourcedNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999176"><span class="hs-identifier hs-var">child</span></a></span><span>
</span><span id="line-301"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680999171"><span class="annot"><span class="annottext">binding :: First Span
</span><a href="#local-6989586621680999171"><span class="hs-identifier hs-var hs-var">binding</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ContextInfo -&gt; First Span) -&gt; Set ContextInfo -&gt; First Span
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Span -&gt; First Span
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe Span -&gt; First Span)
-&gt; (ContextInfo -&gt; Maybe Span) -&gt; ContextInfo -&gt; First Span
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo -&gt; Maybe Span
</span><a href="GHC.Iface.Ext.Utils.html#getBindSiteFromContext"><span class="hs-identifier hs-var">getBindSiteFromContext</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; Set ContextInfo
forall a. IdentifierDetails a -&gt; Set ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#identInfo"><span class="hs-identifier hs-var hs-var">identInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999174"><span class="hs-identifier hs-var">dets</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-302"></span><span>    </span><span class="annot"><span class="annottext">Maybe Span -&gt; [Maybe Span]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">First Span -&gt; Maybe Span
forall a. First a -&gt; Maybe a
</span><a href="../../base/src/Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">First Span
</span><a href="#local-6989586621680999171"><span class="hs-identifier hs-var">binding</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span id="local-6989586621680999865"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getNameScopeAndBinding"><span class="hs-identifier hs-type">getNameScopeAndBinding</span></a></span><span>
</span><span id="line-305"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-306"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">M.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999865"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-307"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Scope"><span class="hs-identifier hs-type">Scope</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-308"></span><span id="getNameScopeAndBinding"><span class="annot"><span class="annottext">getNameScopeAndBinding :: forall a.
Name -&gt; Map FastString (HieAST a) -&gt; Maybe ([Scope], Maybe Span)
</span><a href="GHC.Iface.Ext.Utils.html#getNameScopeAndBinding"><span class="hs-identifier hs-var hs-var">getNameScopeAndBinding</span></a></span></span><span> </span><span id="local-6989586621680999154"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999154"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621680999153"><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999153"><span class="hs-identifier hs-var">asts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#nameSrcSpan"><span class="hs-identifier hs-var">nameSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999154"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-309"></span><span>  </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span id="local-6989586621680999150"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999150"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-comment">-- @Maybe</span><span>
</span><span id="line-310"></span><span>    </span><span id="local-6989586621680999149"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999149"><span class="hs-identifier hs-var">ast</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; Map FastString (HieAST a) -&gt; Maybe (HieAST a)
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">M.lookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; FastString
</span><a href="GHC.Types.SrcLoc.html#srcSpanFile"><span class="hs-identifier hs-var hs-var">srcSpanFile</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999150"><span class="hs-identifier hs-var">sp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999153"><span class="hs-identifier hs-var">asts</span></a></span><span>
</span><span id="line-311"></span><span>    </span><span id="local-6989586621680999148"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999148"><span class="hs-identifier hs-var">defNode</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Span -&gt; HieAST a -&gt; Maybe (HieAST a)
forall a. Span -&gt; HieAST a -&gt; Maybe (HieAST a)
</span><a href="GHC.Iface.Ext.Utils.html#selectLargestContainedBy"><span class="hs-identifier hs-var">selectLargestContainedBy</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999150"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999149"><span class="hs-identifier hs-var">ast</span></a></span><span>
</span><span id="line-312"></span><span>    </span><span class="annot"><span class="annottext">First ([Scope], Maybe Span) -&gt; Maybe ([Scope], Maybe Span)
forall a. First a -&gt; Maybe a
</span><a href="../../base/src/Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">(First ([Scope], Maybe Span) -&gt; Maybe ([Scope], Maybe Span))
-&gt; First ([Scope], Maybe Span) -&gt; Maybe ([Scope], Maybe Span)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe ([Scope], Maybe Span) -&gt; First ([Scope], Maybe Span))
-&gt; [Maybe ([Scope], Maybe Span)] -&gt; First ([Scope], Maybe Span)
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe ([Scope], Maybe Span) -&gt; First ([Scope], Maybe Span)
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">([Maybe ([Scope], Maybe Span)] -&gt; First ([Scope], Maybe Span))
-&gt; [Maybe ([Scope], Maybe Span)] -&gt; First ([Scope], Maybe Span)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-comment">-- @[]</span><span>
</span><span id="line-313"></span><span>      </span><span id="local-6989586621680999146"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999146"><span class="hs-identifier hs-var">node</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; [HieAST a]
forall a. HieAST a -&gt; [HieAST a]
</span><a href="GHC.Iface.Ext.Utils.html#flattenAst"><span class="hs-identifier hs-var">flattenAst</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999148"><span class="hs-identifier hs-var">defNode</span></a></span><span>
</span><span id="line-314"></span><span>      </span><span id="local-6989586621680999145"><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999145"><span class="hs-identifier hs-var">dets</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe (IdentifierDetails a) -&gt; [IdentifierDetails a]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span>
</span><span id="line-315"></span><span>        </span><span class="annot"><span class="annottext">(Maybe (IdentifierDetails a) -&gt; [IdentifierDetails a])
-&gt; Maybe (IdentifierDetails a) -&gt; [IdentifierDetails a]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Identifier
-&gt; Map Identifier (IdentifierDetails a)
-&gt; Maybe (IdentifierDetails a)
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">M.lookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Identifier
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999154"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Map Identifier (IdentifierDetails a)
 -&gt; Maybe (IdentifierDetails a))
-&gt; Map Identifier (IdentifierDetails a)
-&gt; Maybe (IdentifierDetails a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo a -&gt; Map Identifier (IdentifierDetails a)
forall a. SourcedNodeInfo a -&gt; NodeIdentifiers a
</span><a href="GHC.Iface.Ext.Utils.html#sourcedNodeIdents"><span class="hs-identifier hs-var">sourcedNodeIdents</span></a></span><span> </span><span class="annot"><span class="annottext">(SourcedNodeInfo a -&gt; Map Identifier (IdentifierDetails a))
-&gt; SourcedNodeInfo a -&gt; Map Identifier (IdentifierDetails a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; SourcedNodeInfo a
forall a. HieAST a -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#sourcedNodeInfo"><span class="hs-identifier hs-var hs-var">sourcedNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999146"><span class="hs-identifier hs-var">node</span></a></span><span>
</span><span id="line-316"></span><span>      </span><span id="local-6989586621680999144"><span class="annot"><span class="annottext">[Scope]
</span><a href="#local-6989586621680999144"><span class="hs-identifier hs-var">scopes</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe [Scope] -&gt; [[Scope]]
forall a. Maybe a -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#maybeToList"><span class="hs-identifier hs-var">maybeToList</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe [Scope] -&gt; [[Scope]]) -&gt; Maybe [Scope] -&gt; [[Scope]]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(ContextInfo -&gt; Maybe [Scope]) -&gt; Set ContextInfo -&gt; Maybe [Scope]
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo -&gt; Maybe [Scope]
</span><a href="GHC.Iface.Ext.Utils.html#getScopeFromContext"><span class="hs-identifier hs-var">getScopeFromContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; Set ContextInfo
forall a. IdentifierDetails a -&gt; Set ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#identInfo"><span class="hs-identifier hs-var hs-var">identInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999145"><span class="hs-identifier hs-var">dets</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-317"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680999140"><span class="annot"><span class="annottext">binding :: First Span
</span><a href="#local-6989586621680999140"><span class="hs-identifier hs-var hs-var">binding</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ContextInfo -&gt; First Span) -&gt; Set ContextInfo -&gt; First Span
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Span -&gt; First Span
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe Span -&gt; First Span)
-&gt; (ContextInfo -&gt; Maybe Span) -&gt; ContextInfo -&gt; First Span
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo -&gt; Maybe Span
</span><a href="GHC.Iface.Ext.Utils.html#getBindSiteFromContext"><span class="hs-identifier hs-var">getBindSiteFromContext</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; Set ContextInfo
forall a. IdentifierDetails a -&gt; Set ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#identInfo"><span class="hs-identifier hs-var hs-var">identInfo</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a
</span><a href="#local-6989586621680999145"><span class="hs-identifier hs-var">dets</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-318"></span><span>      </span><span class="annot"><span class="annottext">Maybe ([Scope], Maybe Span) -&gt; [Maybe ([Scope], Maybe Span)]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe ([Scope], Maybe Span) -&gt; [Maybe ([Scope], Maybe Span)])
-&gt; Maybe ([Scope], Maybe Span) -&gt; [Maybe ([Scope], Maybe Span)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">([Scope], Maybe Span) -&gt; Maybe ([Scope], Maybe Span)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Scope]
</span><a href="#local-6989586621680999144"><span class="hs-identifier hs-var">scopes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">First Span -&gt; Maybe Span
forall a. First a -&gt; Maybe a
</span><a href="../../base/src/Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">First Span
</span><a href="#local-6989586621680999140"><span class="hs-identifier hs-var">binding</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-319"></span><span>  </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe ([Scope], Maybe Span)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getScopeFromContext"><span class="hs-identifier hs-type">getScopeFromContext</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ContextInfo"><span class="hs-identifier hs-type">ContextInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Scope"><span class="hs-identifier hs-type">Scope</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-322"></span><span id="getScopeFromContext"><span class="annot"><span class="annottext">getScopeFromContext :: ContextInfo -&gt; Maybe [Scope]
</span><a href="GHC.Iface.Ext.Utils.html#getScopeFromContext"><span class="hs-identifier hs-var hs-var">getScopeFromContext</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ValBind"><span class="hs-identifier hs-type">ValBind</span></a></span><span> </span><span class="annot"><span class="annottext">BindType
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680999138"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999138"><span class="hs-identifier hs-var">sc</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Span
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scope] -&gt; Maybe [Scope]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999138"><span class="hs-identifier hs-var">sc</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-323"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getScopeFromContext"><span class="hs-identifier hs-var">getScopeFromContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#PatternBind"><span class="hs-identifier hs-type">PatternBind</span></a></span><span> </span><span id="local-6989586621680999136"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999136"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621680999135"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999135"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Span
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scope] -&gt; Maybe [Scope]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999136"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999135"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-324"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getScopeFromContext"><span class="hs-identifier hs-var">getScopeFromContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ClassTyDecl"><span class="hs-identifier hs-type">ClassTyDecl</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Span
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scope] -&gt; Maybe [Scope]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#ModuleScope"><span class="hs-identifier hs-var">ModuleScope</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-325"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getScopeFromContext"><span class="hs-identifier hs-var">getScopeFromContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Decl"><span class="hs-identifier hs-type">Decl</span></a></span><span> </span><span class="annot"><span class="annottext">DeclType
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe Span
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scope] -&gt; Maybe [Scope]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#ModuleScope"><span class="hs-identifier hs-var">ModuleScope</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-326"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getScopeFromContext"><span class="hs-identifier hs-var">getScopeFromContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TyVarBind"><span class="hs-identifier hs-type">TyVarBind</span></a></span><span> </span><span id="local-6989586621680999131"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999131"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ResolvedScopes"><span class="hs-identifier hs-type">ResolvedScopes</span></a></span><span> </span><span id="local-6989586621680999130"><span class="annot"><span class="annottext">[Scope]
</span><a href="#local-6989586621680999130"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scope] -&gt; Maybe [Scope]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">([Scope] -&gt; Maybe [Scope]) -&gt; [Scope] -&gt; Maybe [Scope]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999131"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">Scope -&gt; [Scope] -&gt; [Scope]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[Scope]
</span><a href="#local-6989586621680999130"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-327"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getScopeFromContext"><span class="hs-identifier hs-var">getScopeFromContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#TyVarBind"><span class="hs-identifier hs-type">TyVarBind</span></a></span><span> </span><span id="local-6989586621680999129"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999129"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><span class="annottext">TyVarScope
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scope] -&gt; Maybe [Scope]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999129"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-328"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getScopeFromContext"><span class="hs-identifier hs-var">getScopeFromContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#EvidenceVarBind"><span class="hs-identifier hs-type">EvidenceVarBind</span></a></span><span> </span><span class="annot"><span class="annottext">EvVarSource
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680999128"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999128"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Span
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Scope] -&gt; Maybe [Scope]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680999128"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-329"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getScopeFromContext"><span class="hs-identifier hs-var">getScopeFromContext</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [Scope]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-330"></span><span>
</span><span id="line-331"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getBindSiteFromContext"><span class="hs-identifier hs-type">getBindSiteFromContext</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ContextInfo"><span class="hs-identifier hs-type">ContextInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span>
</span><span id="line-332"></span><span id="getBindSiteFromContext"><span class="annot"><span class="annottext">getBindSiteFromContext :: ContextInfo -&gt; Maybe Span
</span><a href="GHC.Iface.Ext.Utils.html#getBindSiteFromContext"><span class="hs-identifier hs-var hs-var">getBindSiteFromContext</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ValBind"><span class="hs-identifier hs-type">ValBind</span></a></span><span> </span><span class="annot"><span class="annottext">BindType
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Scope
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680999127"><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999127"><span class="hs-identifier hs-var">sp</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999127"><span class="hs-identifier hs-var">sp</span></a></span><span>
</span><span id="line-333"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getBindSiteFromContext"><span class="hs-identifier hs-var">getBindSiteFromContext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#PatternBind"><span class="hs-identifier hs-type">PatternBind</span></a></span><span> </span><span class="annot"><span class="annottext">Scope
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Scope
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680999126"><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999126"><span class="hs-identifier hs-var">sp</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Span
</span><a href="#local-6989586621680999126"><span class="hs-identifier hs-var">sp</span></a></span><span>
</span><span id="line-334"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getBindSiteFromContext"><span class="hs-identifier hs-var">getBindSiteFromContext</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Span
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span id="local-6989586621680999125"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#flattenAst"><span class="hs-identifier hs-type">flattenAst</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999125"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999125"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-337"></span><span id="flattenAst"><span class="annot"><span class="annottext">flattenAst :: forall a. HieAST a -&gt; [HieAST a]
</span><a href="GHC.Iface.Ext.Utils.html#flattenAst"><span class="hs-identifier hs-var hs-var">flattenAst</span></a></span></span><span> </span><span id="local-6989586621680999123"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999123"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-338"></span><span>  </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999123"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; [HieAST a] -&gt; [HieAST a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">(HieAST a -&gt; [HieAST a]) -&gt; [HieAST a] -&gt; [HieAST a]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; [HieAST a]
forall a. HieAST a -&gt; [HieAST a]
</span><a href="GHC.Iface.Ext.Utils.html#flattenAst"><span class="hs-identifier hs-var">flattenAst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieAST a -&gt; [HieAST a]
forall a. HieAST a -&gt; [HieAST a]
</span><a href="GHC.Iface.Ext.Types.html#nodeChildren"><span class="hs-identifier hs-var hs-var">nodeChildren</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999123"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-339"></span><span>
</span><span id="line-340"></span><span id="local-6989586621680999849"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#smallestContainingSatisfying"><span class="hs-identifier hs-type">smallestContainingSatisfying</span></a></span><span>
</span><span id="line-341"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span>
</span><span id="line-342"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999849"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span>
</span><span id="line-343"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999849"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-344"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999849"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-345"></span><span id="smallestContainingSatisfying"><span class="annot"><span class="annottext">smallestContainingSatisfying :: forall a.
Span -&gt; (HieAST a -&gt; Bool) -&gt; HieAST a -&gt; Maybe (HieAST a)
</span><a href="GHC.Iface.Ext.Utils.html#smallestContainingSatisfying"><span class="hs-identifier hs-var hs-var">smallestContainingSatisfying</span></a></span></span><span> </span><span id="local-6989586621680999117"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999117"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span id="local-6989586621680999116"><span class="annot"><span class="annottext">HieAST a -&gt; Bool
</span><a href="#local-6989586621680999116"><span class="hs-identifier hs-var">cond</span></a></span></span><span> </span><span id="local-6989586621680999115"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999115"><span class="hs-identifier hs-var">node</span></a></span></span><span>
</span><span id="line-346"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Span
forall a. HieAST a -&gt; Span
</span><a href="GHC.Iface.Ext.Types.html#nodeSpan"><span class="hs-identifier hs-var hs-var">nodeSpan</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999115"><span class="hs-identifier hs-var">node</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#containsSpan"><span class="hs-operator hs-var">`containsSpan`</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999117"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">First (HieAST a) -&gt; Maybe (HieAST a)
forall a. First a -&gt; Maybe a
</span><a href="../../base/src/Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">(First (HieAST a) -&gt; Maybe (HieAST a))
-&gt; First (HieAST a) -&gt; Maybe (HieAST a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[First (HieAST a)] -&gt; First (HieAST a)
forall a. Monoid a =&gt; [a] -&gt; a
</span><a href="../../base/src/GHC.Base.html#mconcat"><span class="hs-identifier hs-var">mconcat</span></a></span><span>
</span><span id="line-347"></span><span>      </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">(HieAST a -&gt; First (HieAST a)) -&gt; [HieAST a] -&gt; First (HieAST a)
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe (HieAST a) -&gt; First (HieAST a)
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (HieAST a) -&gt; First (HieAST a))
-&gt; (HieAST a -&gt; Maybe (HieAST a)) -&gt; HieAST a -&gt; First (HieAST a)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; (HieAST a -&gt; Bool) -&gt; HieAST a -&gt; Maybe (HieAST a)
forall a.
Span -&gt; (HieAST a -&gt; Bool) -&gt; HieAST a -&gt; Maybe (HieAST a)
</span><a href="GHC.Iface.Ext.Utils.html#smallestContainingSatisfying"><span class="hs-identifier hs-var">smallestContainingSatisfying</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999117"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Bool
</span><a href="#local-6989586621680999116"><span class="hs-identifier hs-var">cond</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([HieAST a] -&gt; First (HieAST a)) -&gt; [HieAST a] -&gt; First (HieAST a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-348"></span><span>          </span><span class="annot"><span class="annottext">HieAST a -&gt; [HieAST a]
forall a. HieAST a -&gt; [HieAST a]
</span><a href="GHC.Iface.Ext.Types.html#nodeChildren"><span class="hs-identifier hs-var hs-var">nodeChildren</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999115"><span class="hs-identifier hs-var">node</span></a></span><span>
</span><span id="line-349"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST a) -&gt; First (HieAST a)
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (HieAST a) -&gt; First (HieAST a))
-&gt; Maybe (HieAST a) -&gt; First (HieAST a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Bool
</span><a href="#local-6989586621680999116"><span class="hs-identifier hs-var">cond</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999115"><span class="hs-identifier hs-var">node</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Maybe (HieAST a)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999115"><span class="hs-identifier hs-var">node</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST a)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-350"></span><span>      </span><span class="hs-special">]</span><span>
</span><span id="line-351"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999117"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#containsSpan"><span class="hs-operator hs-var">`containsSpan`</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Span
forall a. HieAST a -&gt; Span
</span><a href="GHC.Iface.Ext.Types.html#nodeSpan"><span class="hs-identifier hs-var hs-var">nodeSpan</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999115"><span class="hs-identifier hs-var">node</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST a)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-352"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST a)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-353"></span><span>
</span><span id="line-354"></span><span id="local-6989586621680999113"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#selectLargestContainedBy"><span class="hs-identifier hs-type">selectLargestContainedBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999113"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999113"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-355"></span><span id="selectLargestContainedBy"><span class="annot"><span class="annottext">selectLargestContainedBy :: forall a. Span -&gt; HieAST a -&gt; Maybe (HieAST a)
</span><a href="GHC.Iface.Ext.Utils.html#selectLargestContainedBy"><span class="hs-identifier hs-var hs-var">selectLargestContainedBy</span></a></span></span><span> </span><span id="local-6989586621680999110"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999110"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span id="local-6989586621680999109"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999109"><span class="hs-identifier hs-var">node</span></a></span></span><span>
</span><span id="line-356"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999110"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#containsSpan"><span class="hs-operator hs-var">`containsSpan`</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Span
forall a. HieAST a -&gt; Span
</span><a href="GHC.Iface.Ext.Types.html#nodeSpan"><span class="hs-identifier hs-var hs-var">nodeSpan</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999109"><span class="hs-identifier hs-var">node</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Maybe (HieAST a)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999109"><span class="hs-identifier hs-var">node</span></a></span><span>
</span><span id="line-357"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Span
forall a. HieAST a -&gt; Span
</span><a href="GHC.Iface.Ext.Types.html#nodeSpan"><span class="hs-identifier hs-var hs-var">nodeSpan</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999109"><span class="hs-identifier hs-var">node</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#containsSpan"><span class="hs-operator hs-var">`containsSpan`</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999110"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-358"></span><span>      </span><span class="annot"><span class="annottext">First (HieAST a) -&gt; Maybe (HieAST a)
forall a. First a -&gt; Maybe a
</span><a href="../../base/src/Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">(First (HieAST a) -&gt; Maybe (HieAST a))
-&gt; First (HieAST a) -&gt; Maybe (HieAST a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(HieAST a -&gt; First (HieAST a)) -&gt; [HieAST a] -&gt; First (HieAST a)
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe (HieAST a) -&gt; First (HieAST a)
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (HieAST a) -&gt; First (HieAST a))
-&gt; (HieAST a -&gt; Maybe (HieAST a)) -&gt; HieAST a -&gt; First (HieAST a)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; HieAST a -&gt; Maybe (HieAST a)
forall a. Span -&gt; HieAST a -&gt; Maybe (HieAST a)
</span><a href="GHC.Iface.Ext.Utils.html#selectLargestContainedBy"><span class="hs-identifier hs-var">selectLargestContainedBy</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999110"><span class="hs-identifier hs-var">sp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([HieAST a] -&gt; First (HieAST a)) -&gt; [HieAST a] -&gt; First (HieAST a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-359"></span><span>        </span><span class="annot"><span class="annottext">HieAST a -&gt; [HieAST a]
forall a. HieAST a -&gt; [HieAST a]
</span><a href="GHC.Iface.Ext.Types.html#nodeChildren"><span class="hs-identifier hs-var hs-var">nodeChildren</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999109"><span class="hs-identifier hs-var">node</span></a></span><span>
</span><span id="line-360"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST a)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-361"></span><span>
</span><span id="line-362"></span><span id="local-6989586621680999991"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#selectSmallestContaining"><span class="hs-identifier hs-type">selectSmallestContaining</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999991"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999991"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-363"></span><span id="selectSmallestContaining"><span class="annot"><span class="annottext">selectSmallestContaining :: forall a. Span -&gt; HieAST a -&gt; Maybe (HieAST a)
</span><a href="GHC.Iface.Ext.Utils.html#selectSmallestContaining"><span class="hs-identifier hs-var hs-var">selectSmallestContaining</span></a></span></span><span> </span><span id="local-6989586621680999105"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999105"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span id="local-6989586621680999104"><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999104"><span class="hs-identifier hs-var">node</span></a></span></span><span>
</span><span id="line-364"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Span
forall a. HieAST a -&gt; Span
</span><a href="GHC.Iface.Ext.Types.html#nodeSpan"><span class="hs-identifier hs-var hs-var">nodeSpan</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999104"><span class="hs-identifier hs-var">node</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#containsSpan"><span class="hs-operator hs-var">`containsSpan`</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999105"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">First (HieAST a) -&gt; Maybe (HieAST a)
forall a. First a -&gt; Maybe a
</span><a href="../../base/src/Data.Monoid.html#getFirst"><span class="hs-identifier hs-var hs-var">getFirst</span></a></span><span> </span><span class="annot"><span class="annottext">(First (HieAST a) -&gt; Maybe (HieAST a))
-&gt; First (HieAST a) -&gt; Maybe (HieAST a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[First (HieAST a)] -&gt; First (HieAST a)
forall a. Monoid a =&gt; [a] -&gt; a
</span><a href="../../base/src/GHC.Base.html#mconcat"><span class="hs-identifier hs-var">mconcat</span></a></span><span>
</span><span id="line-365"></span><span>      </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">(HieAST a -&gt; First (HieAST a)) -&gt; [HieAST a] -&gt; First (HieAST a)
forall (t :: * -&gt; *) m a.
(Foldable t, Monoid m) =&gt;
(a -&gt; m) -&gt; t a -&gt; m
</span><a href="../../base/src/Data.Foldable.html#foldMap"><span class="hs-identifier hs-var">foldMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe (HieAST a) -&gt; First (HieAST a)
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe (HieAST a) -&gt; First (HieAST a))
-&gt; (HieAST a -&gt; Maybe (HieAST a)) -&gt; HieAST a -&gt; First (HieAST a)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; HieAST a -&gt; Maybe (HieAST a)
forall a. Span -&gt; HieAST a -&gt; Maybe (HieAST a)
</span><a href="GHC.Iface.Ext.Utils.html#selectSmallestContaining"><span class="hs-identifier hs-var">selectSmallestContaining</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999105"><span class="hs-identifier hs-var">sp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([HieAST a] -&gt; First (HieAST a)) -&gt; [HieAST a] -&gt; First (HieAST a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; [HieAST a]
forall a. HieAST a -&gt; [HieAST a]
</span><a href="GHC.Iface.Ext.Types.html#nodeChildren"><span class="hs-identifier hs-var hs-var">nodeChildren</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999104"><span class="hs-identifier hs-var">node</span></a></span><span>
</span><span id="line-366"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST a) -&gt; First (HieAST a)
forall a. Maybe a -&gt; First a
</span><a href="../../base/src/Data.Monoid.html#First"><span class="hs-identifier hs-var">First</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieAST a -&gt; Maybe (HieAST a)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999104"><span class="hs-identifier hs-var">node</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-367"></span><span>      </span><span class="hs-special">]</span><span>
</span><span id="line-368"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999105"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#containsSpan"><span class="hs-operator hs-var">`containsSpan`</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a -&gt; Span
forall a. HieAST a -&gt; Span
</span><a href="GHC.Iface.Ext.Types.html#nodeSpan"><span class="hs-identifier hs-var hs-var">nodeSpan</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST a
</span><a href="#local-6989586621680999104"><span class="hs-identifier hs-var">node</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST a)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-369"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (HieAST a)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-370"></span><span>
</span><span id="line-371"></span><span id="local-6989586621680999844"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#definedInAsts"><span class="hs-identifier hs-type">definedInAsts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">M.Map</span></a></span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999844"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span></span><span>
</span><span id="line-372"></span><span id="definedInAsts"><span class="annot"><span class="annottext">definedInAsts :: forall a. Map FastString (HieAST a) -&gt; Name -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#definedInAsts"><span class="hs-identifier hs-var hs-var">definedInAsts</span></a></span></span><span> </span><span id="local-6989586621680999100"><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999100"><span class="hs-identifier hs-var">asts</span></a></span></span><span> </span><span id="local-6989586621680999099"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999099"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SrcSpan
</span><a href="GHC.Types.Name.html#nameSrcSpan"><span class="hs-identifier hs-var">nameSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621680999099"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-373"></span><span>  </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span id="local-6989586621680999098"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999098"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Span -&gt; FastString
</span><a href="GHC.Types.SrcLoc.html#srcSpanFile"><span class="hs-identifier hs-var hs-var">srcSpanFile</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999098"><span class="hs-identifier hs-var">sp</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; [FastString] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">Map FastString (HieAST a) -&gt; [FastString]
forall k a. Map k a -&gt; [k]
</span><a href="../../containers/src/Data.Map.Internal.html#keys"><span class="hs-identifier hs-var">M.keys</span></a></span><span> </span><span class="annot"><span class="annottext">Map FastString (HieAST a)
</span><a href="#local-6989586621680999100"><span class="hs-identifier hs-var">asts</span></a></span><span>
</span><span id="line-374"></span><span>  </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-375"></span><span>
</span><span id="line-376"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getEvidenceBindDeps"><span class="hs-identifier hs-type">getEvidenceBindDeps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ContextInfo"><span class="hs-identifier hs-type">ContextInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-377"></span><span id="getEvidenceBindDeps"><span class="annot"><span class="annottext">getEvidenceBindDeps :: ContextInfo -&gt; [Name]
</span><a href="GHC.Iface.Ext.Utils.html#getEvidenceBindDeps"><span class="hs-identifier hs-var hs-var">getEvidenceBindDeps</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#EvidenceVarBind"><span class="hs-identifier hs-type">EvidenceVarBind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#EvLetBind"><span class="hs-identifier hs-type">EvLetBind</span></a></span><span> </span><span id="local-6989586621680999094"><span class="annot"><span class="annottext">EvBindDeps
</span><a href="#local-6989586621680999094"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Scope
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe Span
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-378"></span><span>  </span><span class="annot"><span class="annottext">EvBindDeps -&gt; [Name]
</span><a href="GHC.Iface.Ext.Types.html#getEvBindDeps"><span class="hs-identifier hs-var hs-var">getEvBindDeps</span></a></span><span> </span><span class="annot"><span class="annottext">EvBindDeps
</span><a href="#local-6989586621680999094"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-379"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#getEvidenceBindDeps"><span class="hs-identifier hs-var">getEvidenceBindDeps</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-380"></span><span>
</span><span id="line-381"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#isEvidenceBind"><span class="hs-identifier hs-type">isEvidenceBind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ContextInfo"><span class="hs-identifier hs-type">ContextInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-382"></span><span id="isEvidenceBind"><span class="annot"><span class="annottext">isEvidenceBind :: ContextInfo -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#isEvidenceBind"><span class="hs-identifier hs-var hs-var">isEvidenceBind</span></a></span></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#EvidenceVarBind"><span class="hs-identifier hs-type">EvidenceVarBind</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-383"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#isEvidenceBind"><span class="hs-identifier hs-var">isEvidenceBind</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#isEvidenceContext"><span class="hs-identifier hs-type">isEvidenceContext</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ContextInfo"><span class="hs-identifier hs-type">ContextInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-386"></span><span id="isEvidenceContext"><span class="annot"><span class="annottext">isEvidenceContext :: ContextInfo -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#isEvidenceContext"><span class="hs-identifier hs-var hs-var">isEvidenceContext</span></a></span></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#EvidenceVarUse"><span class="hs-identifier hs-var">EvidenceVarUse</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-387"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#isEvidenceContext"><span class="hs-identifier hs-var">isEvidenceContext</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#EvidenceVarBind"><span class="hs-identifier hs-type">EvidenceVarBind</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-388"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#isEvidenceContext"><span class="hs-identifier hs-var">isEvidenceContext</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-389"></span><span>
</span><span id="line-390"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#isEvidenceUse"><span class="hs-identifier hs-type">isEvidenceUse</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ContextInfo"><span class="hs-identifier hs-type">ContextInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-391"></span><span id="isEvidenceUse"><span class="annot"><span class="annottext">isEvidenceUse :: ContextInfo -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#isEvidenceUse"><span class="hs-identifier hs-var hs-var">isEvidenceUse</span></a></span></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#EvidenceVarUse"><span class="hs-identifier hs-var">EvidenceVarUse</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-392"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#isEvidenceUse"><span class="hs-identifier hs-var">isEvidenceUse</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-393"></span><span>
</span><span id="line-394"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#isOccurrence"><span class="hs-identifier hs-type">isOccurrence</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#ContextInfo"><span class="hs-identifier hs-type">ContextInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-395"></span><span id="isOccurrence"><span class="annot"><span class="annottext">isOccurrence :: ContextInfo -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#isOccurrence"><span class="hs-identifier hs-var hs-var">isOccurrence</span></a></span></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#Use"><span class="hs-identifier hs-var">Use</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-396"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#isOccurrence"><span class="hs-identifier hs-var">isOccurrence</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><a href="GHC.Iface.Ext.Types.html#EvidenceVarUse"><span class="hs-identifier hs-var">EvidenceVarUse</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-397"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#isOccurrence"><span class="hs-identifier hs-var">isOccurrence</span></a></span><span> </span><span class="annot"><span class="annottext">ContextInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-398"></span><span>
</span><span id="line-399"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#scopeContainsSpan"><span class="hs-identifier hs-type">scopeContainsSpan</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Scope"><span class="hs-identifier hs-type">Scope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-400"></span><span id="scopeContainsSpan"><span class="annot"><span class="annottext">scopeContainsSpan :: Scope -&gt; Span -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#scopeContainsSpan"><span class="hs-identifier hs-var hs-var">scopeContainsSpan</span></a></span></span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#NoScope"><span class="hs-identifier hs-var">NoScope</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-401"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#scopeContainsSpan"><span class="hs-identifier hs-var">scopeContainsSpan</span></a></span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#ModuleScope"><span class="hs-identifier hs-var">ModuleScope</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-402"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#scopeContainsSpan"><span class="hs-identifier hs-var">scopeContainsSpan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#LocalScope"><span class="hs-identifier hs-type">LocalScope</span></a></span><span> </span><span id="local-6989586621680999087"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999087"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680999086"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999086"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999087"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#containsSpan"><span class="hs-operator hs-var">`containsSpan`</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999086"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-403"></span><span>
</span><span id="line-404"></span><span class="hs-comment">-- | One must contain the other. Leaf nodes cannot contain anything</span><span>
</span><span id="line-405"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#combineAst"><span class="hs-identifier hs-type">combineAst</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-406"></span><span id="combineAst"><span class="annot"><span class="annottext">combineAst :: HieAST Type -&gt; HieAST Type -&gt; HieAST Type
</span><a href="GHC.Iface.Ext.Utils.html#combineAst"><span class="hs-identifier hs-var hs-var">combineAst</span></a></span></span><span> </span><span id="local-6989586621680999084"><span class="annot"><span class="annottext">a :: HieAST Type
</span><a href="#local-6989586621680999084"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span id="local-6989586621680999083"><span class="annot"><span class="annottext">SourcedNodeInfo Type
</span><a href="#local-6989586621680999083"><span class="hs-identifier hs-var">aInf</span></a></span></span><span> </span><span id="local-6989586621680999082"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999082"><span class="hs-identifier hs-var">aSpn</span></a></span></span><span> </span><span id="local-6989586621680999081"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999081"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680999080"><span class="annot"><span class="annottext">b :: HieAST Type
</span><a href="#local-6989586621680999080"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span id="local-6989586621680999079"><span class="annot"><span class="annottext">SourcedNodeInfo Type
</span><a href="#local-6989586621680999079"><span class="hs-identifier hs-var">bInf</span></a></span></span><span> </span><span id="local-6989586621680999078"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999078"><span class="hs-identifier hs-var">bSpn</span></a></span></span><span> </span><span id="local-6989586621680999077"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999077"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-407"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999082"><span class="hs-identifier hs-var">aSpn</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999078"><span class="hs-identifier hs-var">bSpn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo Type -&gt; Span -&gt; [HieAST Type] -&gt; HieAST Type
forall a. SourcedNodeInfo a -&gt; Span -&gt; [HieAST a] -&gt; HieAST a
</span><a href="GHC.Iface.Ext.Types.html#Node"><span class="hs-identifier hs-var">Node</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SourcedNodeInfo Type
</span><a href="#local-6989586621680999083"><span class="hs-identifier hs-var">aInf</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo Type
-&gt; SourcedNodeInfo Type -&gt; SourcedNodeInfo Type
</span><a href="GHC.Iface.Ext.Utils.html#combineSourcedNodeInfo"><span class="hs-operator hs-var">`combineSourcedNodeInfo`</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo Type
</span><a href="#local-6989586621680999079"><span class="hs-identifier hs-var">bInf</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999082"><span class="hs-identifier hs-var">aSpn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[HieAST Type] -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999081"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999077"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-408"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999082"><span class="hs-identifier hs-var">aSpn</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#containsSpan"><span class="hs-operator hs-var">`containsSpan`</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999078"><span class="hs-identifier hs-var">bSpn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; HieAST Type -&gt; HieAST Type
</span><a href="GHC.Iface.Ext.Utils.html#combineAst"><span class="hs-identifier hs-var">combineAst</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999080"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999084"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-409"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#combineAst"><span class="hs-identifier hs-var">combineAst</span></a></span><span> </span><span id="local-6989586621680999074"><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999074"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span id="local-6989586621680999073"><span class="annot"><span class="annottext">SourcedNodeInfo Type
</span><a href="#local-6989586621680999073"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621680999072"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999072"><span class="hs-identifier hs-var">span</span></a></span></span><span> </span><span id="local-6989586621680999071"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999071"><span class="hs-identifier hs-var">children</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo Type -&gt; Span -&gt; [HieAST Type] -&gt; HieAST Type
forall a. SourcedNodeInfo a -&gt; Span -&gt; [HieAST a] -&gt; HieAST a
</span><a href="GHC.Iface.Ext.Types.html#Node"><span class="hs-identifier hs-var">Node</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo Type
</span><a href="#local-6989586621680999073"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999072"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieAST Type -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#insertAst"><span class="hs-identifier hs-var">insertAst</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999074"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999071"><span class="hs-identifier hs-var">children</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-410"></span><span>
</span><span id="line-411"></span><span class="hs-comment">-- | Insert an AST in a sorted list of disjoint Asts</span><span>
</span><span id="line-412"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#insertAst"><span class="hs-identifier hs-type">insertAst</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-413"></span><span id="insertAst"><span class="annot"><span class="annottext">insertAst :: HieAST Type -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#insertAst"><span class="hs-identifier hs-var hs-var">insertAst</span></a></span></span><span> </span><span id="local-6989586621680999069"><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999069"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HieAST Type] -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999069"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-414"></span><span>
</span><span id="line-415"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#nodeInfo"><span class="hs-identifier hs-type">nodeInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-type">NodeInfo</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-416"></span><span id="nodeInfo"><span class="annot"><span class="annottext">nodeInfo :: HieAST Type -&gt; NodeInfo Type
</span><a href="GHC.Iface.Ext.Utils.html#nodeInfo"><span class="hs-identifier hs-var hs-var">nodeInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(NodeInfo Type -&gt; NodeInfo Type -&gt; NodeInfo Type)
-&gt; NodeInfo Type -&gt; Map NodeOrigin (NodeInfo Type) -&gt; NodeInfo Type
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">NodeInfo Type -&gt; NodeInfo Type -&gt; NodeInfo Type
</span><a href="GHC.Iface.Ext.Utils.html#combineNodeInfo"><span class="hs-identifier hs-var">combineNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">NodeInfo Type
forall a. NodeInfo a
</span><a href="GHC.Iface.Ext.Utils.html#emptyNodeInfo"><span class="hs-identifier hs-var">emptyNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">(Map NodeOrigin (NodeInfo Type) -&gt; NodeInfo Type)
-&gt; (HieAST Type -&gt; Map NodeOrigin (NodeInfo Type))
-&gt; HieAST Type
-&gt; NodeInfo Type
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo Type -&gt; Map NodeOrigin (NodeInfo Type)
forall a. SourcedNodeInfo a -&gt; Map NodeOrigin (NodeInfo a)
</span><a href="GHC.Iface.Ext.Types.html#getSourcedNodeInfo"><span class="hs-identifier hs-var hs-var">getSourcedNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">(SourcedNodeInfo Type -&gt; Map NodeOrigin (NodeInfo Type))
-&gt; (HieAST Type -&gt; SourcedNodeInfo Type)
-&gt; HieAST Type
-&gt; Map NodeOrigin (NodeInfo Type)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; SourcedNodeInfo Type
forall a. HieAST a -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#sourcedNodeInfo"><span class="hs-identifier hs-var hs-var">sourcedNodeInfo</span></a></span><span>
</span><span id="line-417"></span><span>
</span><span id="line-418"></span><span id="local-6989586621680999837"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#emptyNodeInfo"><span class="hs-identifier hs-type">emptyNodeInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-type">NodeInfo</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999837"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-419"></span><span id="emptyNodeInfo"><span class="annot"><span class="annottext">emptyNodeInfo :: forall a. NodeInfo a
</span><a href="GHC.Iface.Ext.Utils.html#emptyNodeInfo"><span class="hs-identifier hs-var hs-var">emptyNodeInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set (FastString, FastString)
-&gt; [a] -&gt; NodeIdentifiers a -&gt; NodeInfo a
forall a.
Set (FastString, FastString)
-&gt; [a] -&gt; NodeIdentifiers a -&gt; NodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-var">NodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Set (FastString, FastString)
forall a. Set a
</span><a href="../../containers/src/Data.Set.Internal.html#empty"><span class="hs-identifier hs-var">S.empty</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">NodeIdentifiers a
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span>
</span><span id="line-420"></span><span>
</span><span id="line-421"></span><span id="local-6989586621681000020"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#sourcedNodeIdents"><span class="hs-identifier hs-type">sourcedNodeIdents</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#SourcedNodeInfo"><span class="hs-identifier hs-type">SourcedNodeInfo</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681000020"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeIdentifiers"><span class="hs-identifier hs-type">NodeIdentifiers</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681000020"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-422"></span><span id="sourcedNodeIdents"><span class="annot"><span class="annottext">sourcedNodeIdents :: forall a. SourcedNodeInfo a -&gt; NodeIdentifiers a
</span><a href="GHC.Iface.Ext.Utils.html#sourcedNodeIdents"><span class="hs-identifier hs-var hs-var">sourcedNodeIdents</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IdentifierDetails a -&gt; IdentifierDetails a -&gt; IdentifierDetails a)
-&gt; Map NodeOrigin (Map Identifier (IdentifierDetails a))
-&gt; Map Identifier (IdentifierDetails a)
forall (f :: * -&gt; *) k a.
(Foldable f, Ord k) =&gt;
(a -&gt; a -&gt; a) -&gt; f (Map k a) -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#unionsWith"><span class="hs-identifier hs-var">M.unionsWith</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails a -&gt; IdentifierDetails a -&gt; IdentifierDetails a
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">(&lt;&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">(Map NodeOrigin (Map Identifier (IdentifierDetails a))
 -&gt; Map Identifier (IdentifierDetails a))
-&gt; (SourcedNodeInfo a
    -&gt; Map NodeOrigin (Map Identifier (IdentifierDetails a)))
-&gt; SourcedNodeInfo a
-&gt; Map Identifier (IdentifierDetails a)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(NodeInfo a -&gt; Map Identifier (IdentifierDetails a))
-&gt; Map NodeOrigin (NodeInfo a)
-&gt; Map NodeOrigin (Map Identifier (IdentifierDetails a))
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">NodeInfo a -&gt; Map Identifier (IdentifierDetails a)
forall a. NodeInfo a -&gt; NodeIdentifiers a
</span><a href="GHC.Iface.Ext.Types.html#nodeIdentifiers"><span class="hs-identifier hs-var hs-var">nodeIdentifiers</span></a></span><span> </span><span class="annot"><span class="annottext">(Map NodeOrigin (NodeInfo a)
 -&gt; Map NodeOrigin (Map Identifier (IdentifierDetails a)))
-&gt; (SourcedNodeInfo a -&gt; Map NodeOrigin (NodeInfo a))
-&gt; SourcedNodeInfo a
-&gt; Map NodeOrigin (Map Identifier (IdentifierDetails a))
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo a -&gt; Map NodeOrigin (NodeInfo a)
forall a. SourcedNodeInfo a -&gt; Map NodeOrigin (NodeInfo a)
</span><a href="GHC.Iface.Ext.Types.html#getSourcedNodeInfo"><span class="hs-identifier hs-var hs-var">getSourcedNodeInfo</span></a></span><span>
</span><span id="line-423"></span><span>
</span><span id="line-424"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#combineSourcedNodeInfo"><span class="hs-identifier hs-type">combineSourcedNodeInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#SourcedNodeInfo"><span class="hs-identifier hs-type">SourcedNodeInfo</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#SourcedNodeInfo"><span class="hs-identifier hs-type">SourcedNodeInfo</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#SourcedNodeInfo"><span class="hs-identifier hs-type">SourcedNodeInfo</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-425"></span><span id="combineSourcedNodeInfo"><span class="annot"><span class="annottext">combineSourcedNodeInfo :: SourcedNodeInfo Type
-&gt; SourcedNodeInfo Type -&gt; SourcedNodeInfo Type
</span><a href="GHC.Iface.Ext.Utils.html#combineSourcedNodeInfo"><span class="hs-identifier hs-var hs-var">combineSourcedNodeInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Map NodeOrigin (NodeInfo Type)
 -&gt; Map NodeOrigin (NodeInfo Type)
 -&gt; Map NodeOrigin (NodeInfo Type))
-&gt; SourcedNodeInfo Type
-&gt; SourcedNodeInfo Type
-&gt; SourcedNodeInfo Type
</span><span class="hs-identifier hs-var">coerce</span></span><span> </span><span class="annot"><span class="annottext">((Map NodeOrigin (NodeInfo Type)
  -&gt; Map NodeOrigin (NodeInfo Type)
  -&gt; Map NodeOrigin (NodeInfo Type))
 -&gt; SourcedNodeInfo Type
 -&gt; SourcedNodeInfo Type
 -&gt; SourcedNodeInfo Type)
-&gt; (Map NodeOrigin (NodeInfo Type)
    -&gt; Map NodeOrigin (NodeInfo Type)
    -&gt; Map NodeOrigin (NodeInfo Type))
-&gt; SourcedNodeInfo Type
-&gt; SourcedNodeInfo Type
-&gt; SourcedNodeInfo Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(NodeInfo Type -&gt; NodeInfo Type -&gt; NodeInfo Type)
-&gt; Map NodeOrigin (NodeInfo Type)
-&gt; Map NodeOrigin (NodeInfo Type)
-&gt; Map NodeOrigin (NodeInfo Type)
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; Map k a -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#unionWith"><span class="hs-identifier hs-var">M.unionWith</span></a></span><span> </span><span class="annot"><span class="annottext">NodeInfo Type -&gt; NodeInfo Type -&gt; NodeInfo Type
</span><a href="GHC.Iface.Ext.Utils.html#combineNodeInfo"><span class="hs-identifier hs-var">combineNodeInfo</span></a></span><span>
</span><span id="line-426"></span><span>
</span><span id="line-427"></span><span class="hs-comment">-- | Merge two nodes together.</span><span>
</span><span id="line-428"></span><span class="hs-comment">--</span><span>
</span><span id="line-429"></span><span class="hs-comment">-- Precondition and postcondition: elements in 'nodeType' are ordered.</span><span>
</span><span id="line-430"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#combineNodeInfo"><span class="hs-identifier hs-type">combineNodeInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-type">NodeInfo</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-type">NodeInfo</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-type">NodeInfo</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>
</span><span id="line-431"></span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-type">NodeInfo</span></a></span><span> </span><span id="local-6989586621680999058"><span class="annot"><span class="annottext">Set (FastString, FastString)
</span><a href="#local-6989586621680999058"><span class="hs-keyword hs-var">as</span></a></span></span><span> </span><span id="local-6989586621680999057"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999057"><span class="hs-identifier hs-var">ai</span></a></span></span><span> </span><span id="local-6989586621680999056"><span class="annot"><span class="annottext">NodeIdentifiers Type
</span><a href="#local-6989586621680999056"><span class="hs-identifier hs-var">ad</span></a></span></span><span class="hs-special">)</span><span> </span><span id="combineNodeInfo"><span class="annot"><span class="annottext">combineNodeInfo :: NodeInfo Type -&gt; NodeInfo Type -&gt; NodeInfo Type
</span><a href="GHC.Iface.Ext.Utils.html#combineNodeInfo"><span class="hs-operator hs-var hs-var">`combineNodeInfo`</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-type">NodeInfo</span></a></span><span> </span><span id="local-6989586621680999055"><span class="annot"><span class="annottext">Set (FastString, FastString)
</span><a href="#local-6989586621680999055"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span id="local-6989586621680999054"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999054"><span class="hs-identifier hs-var">bi</span></a></span></span><span> </span><span id="local-6989586621680999053"><span class="annot"><span class="annottext">NodeIdentifiers Type
</span><a href="#local-6989586621680999053"><span class="hs-identifier hs-var">bd</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-432"></span><span>  </span><span class="annot"><span class="annottext">Set (FastString, FastString)
-&gt; [Type] -&gt; NodeIdentifiers Type -&gt; NodeInfo Type
forall a.
Set (FastString, FastString)
-&gt; [a] -&gt; NodeIdentifiers a -&gt; NodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-var">NodeInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Set (FastString, FastString)
-&gt; Set (FastString, FastString) -&gt; Set (FastString, FastString)
forall a. Ord a =&gt; Set a -&gt; Set a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#union"><span class="hs-identifier hs-var">S.union</span></a></span><span> </span><span class="annot"><span class="annottext">Set (FastString, FastString)
</span><a href="#local-6989586621680999058"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">Set (FastString, FastString)
</span><a href="#local-6989586621680999055"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Type] -&gt; [Type] -&gt; [Type]
</span><a href="#local-6989586621680999051"><span class="hs-identifier hs-var">mergeSorted</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999057"><span class="hs-identifier hs-var">ai</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999054"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(IdentifierDetails Type
 -&gt; IdentifierDetails Type -&gt; IdentifierDetails Type)
-&gt; NodeIdentifiers Type
-&gt; NodeIdentifiers Type
-&gt; NodeIdentifiers Type
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; Map k a -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#unionWith"><span class="hs-identifier hs-var">M.unionWith</span></a></span><span> </span><span class="annot"><span class="annottext">IdentifierDetails Type
-&gt; IdentifierDetails Type -&gt; IdentifierDetails Type
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">(&lt;&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">NodeIdentifiers Type
</span><a href="#local-6989586621680999056"><span class="hs-identifier hs-var">ad</span></a></span><span> </span><span class="annot"><span class="annottext">NodeIdentifiers Type
</span><a href="#local-6989586621680999053"><span class="hs-identifier hs-var">bd</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-433"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-434"></span><span>    </span><span class="annot"><a href="#local-6989586621680999051"><span class="hs-identifier hs-type">mergeSorted</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-435"></span><span>    </span><span id="local-6989586621680999051"><span class="annot"><span class="annottext">mergeSorted :: [Type] -&gt; [Type] -&gt; [Type]
</span><a href="#local-6989586621680999051"><span class="hs-identifier hs-var hs-var">mergeSorted</span></a></span></span><span> </span><span id="local-6989586621680999050"><span class="annot"><span class="annottext">la :: [Type]
</span><a href="#local-6989586621680999050"><span class="hs-identifier hs-var">la</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621680999049"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999049"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999048"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999048"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680999047"><span class="annot"><span class="annottext">lb :: [Type]
</span><a href="#local-6989586621680999047"><span class="hs-identifier hs-var">lb</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621680999046"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999046"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999045"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999045"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type -&gt; Ordering
</span><a href="GHC.Core.Type.html#nonDetCmpType"><span class="hs-identifier hs-var">nonDetCmpType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999049"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999046"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-436"></span><span>                                        </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999049"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; [Type] -&gt; [Type]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Type] -&gt; [Type]
</span><a href="#local-6989586621680999051"><span class="hs-identifier hs-var">mergeSorted</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999048"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999047"><span class="hs-identifier hs-var">lb</span></a></span><span>
</span><span id="line-437"></span><span>                                        </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999049"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; [Type] -&gt; [Type]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Type] -&gt; [Type]
</span><a href="#local-6989586621680999051"><span class="hs-identifier hs-var">mergeSorted</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999048"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999045"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-438"></span><span>                                        </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680999046"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Type -&gt; [Type] -&gt; [Type]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Type] -&gt; [Type]
</span><a href="#local-6989586621680999051"><span class="hs-identifier hs-var">mergeSorted</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999050"><span class="hs-identifier hs-var">la</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999045"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-439"></span><span>    </span><span class="annot"><a href="#local-6989586621680999051"><span class="hs-identifier hs-var">mergeSorted</span></a></span><span> </span><span id="local-6989586621680999043"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999043"><span class="hs-keyword hs-var">as</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999043"><span class="hs-keyword hs-var">as</span></a></span><span>
</span><span id="line-440"></span><span>    </span><span class="annot"><a href="#local-6989586621680999051"><span class="hs-identifier hs-var">mergeSorted</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621680999042"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999042"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621680999042"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-441"></span><span>
</span><span id="line-442"></span><span>
</span><span id="line-443"></span><span class="hs-comment">{- | Merge two sorted, disjoint lists of ASTs, combining when necessary.

In the absence of position-altering pragmas (ex: @# line &quot;file.hs&quot; 3@),
different nodes in an AST tree should either have disjoint spans (in
which case you can say for sure which one comes first) or one span
should be completely contained in the other (in which case the contained
span corresponds to some child node).

However, since Haskell does have position-altering pragmas it /is/
possible for spans to be overlapping. Here is an example of a source file
in which @foozball@ and @quuuuuux@ have overlapping spans:

@
module Baz where

# line 3 &quot;Baz.hs&quot;
foozball :: Int
foozball = 0

# line 3 &quot;Baz.hs&quot;
bar, quuuuuux :: Int
bar = 1
quuuuuux = 2
@

In these cases, we just do our best to produce sensible `HieAST`'s. The blame
should be laid at the feet of whoever wrote the line pragmas in the first place
(usually the C preprocessor...).
-}</span><span>
</span><span id="line-472"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-type">mergeAsts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-473"></span><span id="mergeAsts"><span class="annot"><span class="annottext">mergeAsts :: [HieAST Type] -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var hs-var">mergeAsts</span></a></span></span><span> </span><span id="local-6989586621680999041"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999041"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999041"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-474"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621680999040"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999040"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999040"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-475"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span id="local-6989586621680999039"><span class="annot"><span class="annottext">xs :: [HieAST Type]
</span><a href="#local-6989586621680999039"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621680999038"><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999038"><span class="hs-identifier hs-var">a</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999037"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999037"><span class="hs-keyword hs-var">as</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680999036"><span class="annot"><span class="annottext">ys :: [HieAST Type]
</span><a href="#local-6989586621680999036"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621680999035"><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999035"><span class="hs-identifier hs-var">b</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999034"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999034"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-476"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999033"><span class="hs-identifier hs-var">span_a</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#containsSpan"><span class="hs-operator hs-var">`containsSpan`</span></a></span><span>   </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999032"><span class="hs-identifier hs-var">span_b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HieAST Type] -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieAST Type -&gt; HieAST Type -&gt; HieAST Type
</span><a href="GHC.Iface.Ext.Utils.html#combineAst"><span class="hs-identifier hs-var">combineAst</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999038"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999035"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; [HieAST Type] -&gt; [HieAST Type]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999037"><span class="hs-keyword hs-var">as</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999034"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-477"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999032"><span class="hs-identifier hs-var">span_b</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Types.SrcLoc.html#containsSpan"><span class="hs-operator hs-var">`containsSpan`</span></a></span><span>   </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999033"><span class="hs-identifier hs-var">span_a</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HieAST Type] -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999037"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HieAST Type -&gt; HieAST Type -&gt; HieAST Type
</span><a href="GHC.Iface.Ext.Utils.html#combineAst"><span class="hs-identifier hs-var">combineAst</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999038"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999035"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; [HieAST Type] -&gt; [HieAST Type]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999034"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-478"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999033"><span class="hs-identifier hs-var">span_a</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#rightOf"><span class="hs-operator hs-var">`rightOf`</span></a></span><span>        </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999032"><span class="hs-identifier hs-var">span_b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999035"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; [HieAST Type] -&gt; [HieAST Type]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[HieAST Type] -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999039"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999034"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-479"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999033"><span class="hs-identifier hs-var">span_a</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#leftOf"><span class="hs-operator hs-var">`leftOf`</span></a></span><span>         </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999032"><span class="hs-identifier hs-var">span_b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999038"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; [HieAST Type] -&gt; [HieAST Type]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[HieAST Type] -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999037"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999036"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-480"></span><span>
</span><span id="line-481"></span><span>  </span><span class="hs-comment">-- These cases are to work around ASTs that are not fully disjoint</span><span>
</span><span id="line-482"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999033"><span class="hs-identifier hs-var">span_a</span></a></span><span> </span><span class="annot"><span class="annottext">Span -&gt; Span -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#startsRightOf"><span class="hs-operator hs-var">`startsRightOf`</span></a></span><span>  </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999032"><span class="hs-identifier hs-var">span_b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999035"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; [HieAST Type] -&gt; [HieAST Type]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[HieAST Type] -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999037"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999036"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-483"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999038"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; [HieAST Type] -&gt; [HieAST Type]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[HieAST Type] -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999037"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999036"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-484"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-485"></span><span>    </span><span id="local-6989586621680999033"><span class="annot"><span class="annottext">span_a :: Span
</span><a href="#local-6989586621680999033"><span class="hs-identifier hs-var hs-var">span_a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; Span
forall a. HieAST a -&gt; Span
</span><a href="GHC.Iface.Ext.Types.html#nodeSpan"><span class="hs-identifier hs-var hs-var">nodeSpan</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999038"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-486"></span><span>    </span><span id="local-6989586621680999032"><span class="annot"><span class="annottext">span_b :: Span
</span><a href="#local-6989586621680999032"><span class="hs-identifier hs-var hs-var">span_b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; Span
forall a. HieAST a -&gt; Span
</span><a href="GHC.Iface.Ext.Types.html#nodeSpan"><span class="hs-identifier hs-var hs-var">nodeSpan</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type
</span><a href="#local-6989586621680999035"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-487"></span><span>
</span><span id="line-488"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#rightOf"><span class="hs-identifier hs-type">rightOf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-489"></span><span id="rightOf"><span class="annot"><span class="annottext">rightOf :: Span -&gt; Span -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#rightOf"><span class="hs-identifier hs-var hs-var">rightOf</span></a></span></span><span> </span><span id="local-6989586621680999028"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999028"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621680999027"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999027"><span class="hs-identifier hs-var">s2</span></a></span></span><span>
</span><span id="line-490"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanStartLine"><span class="hs-identifier hs-var">srcSpanStartLine</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999028"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanStartCol"><span class="hs-identifier hs-var">srcSpanStartCol</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999028"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-491"></span><span>       </span><span class="annot"><span class="annottext">(Int, Int) -&gt; (Int, Int) -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanEndLine"><span class="hs-identifier hs-var">srcSpanEndLine</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999027"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanEndCol"><span class="hs-identifier hs-var">srcSpanEndCol</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999027"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-492"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; FastString
</span><a href="GHC.Types.SrcLoc.html#srcSpanFile"><span class="hs-identifier hs-var hs-var">srcSpanFile</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999028"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Span -&gt; FastString
</span><a href="GHC.Types.SrcLoc.html#srcSpanFile"><span class="hs-identifier hs-var hs-var">srcSpanFile</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999027"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-493"></span><span>
</span><span id="line-494"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#leftOf"><span class="hs-identifier hs-type">leftOf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-495"></span><span id="leftOf"><span class="annot"><span class="annottext">leftOf :: Span -&gt; Span -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#leftOf"><span class="hs-identifier hs-var hs-var">leftOf</span></a></span></span><span> </span><span id="local-6989586621680999021"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999021"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621680999020"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999020"><span class="hs-identifier hs-var">s2</span></a></span></span><span>
</span><span id="line-496"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanEndLine"><span class="hs-identifier hs-var">srcSpanEndLine</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999021"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanEndCol"><span class="hs-identifier hs-var">srcSpanEndCol</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999021"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-497"></span><span>       </span><span class="annot"><span class="annottext">(Int, Int) -&gt; (Int, Int) -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanStartLine"><span class="hs-identifier hs-var">srcSpanStartLine</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999020"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanStartCol"><span class="hs-identifier hs-var">srcSpanStartCol</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999020"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-498"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; FastString
</span><a href="GHC.Types.SrcLoc.html#srcSpanFile"><span class="hs-identifier hs-var hs-var">srcSpanFile</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999021"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Span -&gt; FastString
</span><a href="GHC.Types.SrcLoc.html#srcSpanFile"><span class="hs-identifier hs-var hs-var">srcSpanFile</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999020"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-499"></span><span>
</span><span id="line-500"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#startsRightOf"><span class="hs-identifier hs-type">startsRightOf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Span"><span class="hs-identifier hs-type">Span</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-501"></span><span id="startsRightOf"><span class="annot"><span class="annottext">startsRightOf :: Span -&gt; Span -&gt; Bool
</span><a href="GHC.Iface.Ext.Utils.html#startsRightOf"><span class="hs-identifier hs-var hs-var">startsRightOf</span></a></span></span><span> </span><span id="local-6989586621680999018"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999018"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621680999017"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999017"><span class="hs-identifier hs-var">s2</span></a></span></span><span>
</span><span id="line-502"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanStartLine"><span class="hs-identifier hs-var">srcSpanStartLine</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999018"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanStartCol"><span class="hs-identifier hs-var">srcSpanStartCol</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999018"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-503"></span><span>       </span><span class="annot"><span class="annottext">(Int, Int) -&gt; (Int, Int) -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanStartLine"><span class="hs-identifier hs-var">srcSpanStartLine</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999017"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Span -&gt; Int
</span><a href="GHC.Types.SrcLoc.html#srcSpanStartCol"><span class="hs-identifier hs-var">srcSpanStartCol</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680999017"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-504"></span><span>
</span><span id="line-505"></span><span class="hs-comment">-- | combines and sorts ASTs using a merge sort</span><span>
</span><span id="line-506"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#mergeSortAsts"><span class="hs-identifier hs-type">mergeSortAsts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-507"></span><span id="mergeSortAsts"><span class="annot"><span class="annottext">mergeSortAsts :: [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeSortAsts"><span class="hs-identifier hs-var hs-var">mergeSortAsts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[HieAST Type]] -&gt; [HieAST Type]
</span><a href="#local-6989586621680999015"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">([[HieAST Type]] -&gt; [HieAST Type])
-&gt; ([HieAST Type] -&gt; [[HieAST Type]])
-&gt; [HieAST Type]
-&gt; [HieAST Type]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(HieAST Type -&gt; [HieAST Type]) -&gt; [HieAST Type] -&gt; [[HieAST Type]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">HieAST Type -&gt; [HieAST Type]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span>
</span><span id="line-508"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-509"></span><span>    </span><span id="local-6989586621680999015"><span class="annot"><span class="annottext">go :: [[HieAST Type]] -&gt; [HieAST Type]
</span><a href="#local-6989586621680999015"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-510"></span><span>    </span><span class="annot"><a href="#local-6989586621680999015"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621680999014"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999014"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999014"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-511"></span><span>    </span><span class="annot"><a href="#local-6989586621680999015"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621680999013"><span class="annot"><span class="annottext">[[HieAST Type]]
</span><a href="#local-6989586621680999013"><span class="hs-identifier hs-var">xss</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[[HieAST Type]] -&gt; [HieAST Type]
</span><a href="#local-6989586621680999015"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[[HieAST Type]] -&gt; [[HieAST Type]]
</span><a href="#local-6989586621680999012"><span class="hs-identifier hs-var">mergePairs</span></a></span><span> </span><span class="annot"><span class="annottext">[[HieAST Type]]
</span><a href="#local-6989586621680999013"><span class="hs-identifier hs-var">xss</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-512"></span><span>    </span><span id="local-6989586621680999012"><span class="annot"><span class="annottext">mergePairs :: [[HieAST Type]] -&gt; [[HieAST Type]]
</span><a href="#local-6989586621680999012"><span class="hs-identifier hs-var hs-var">mergePairs</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-513"></span><span>    </span><span class="annot"><a href="#local-6989586621680999012"><span class="hs-identifier hs-var">mergePairs</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621680999011"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999011"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999011"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-514"></span><span>    </span><span class="annot"><a href="#local-6989586621680999012"><span class="hs-identifier hs-var">mergePairs</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680999010"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999010"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999009"><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999009"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680999008"><span class="annot"><span class="annottext">[[HieAST Type]]
</span><a href="#local-6989586621680999008"><span class="hs-identifier hs-var">xss</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HieAST Type] -&gt; [HieAST Type] -&gt; [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#mergeAsts"><span class="hs-identifier hs-var">mergeAsts</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999010"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type]
</span><a href="#local-6989586621680999009"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">[HieAST Type] -&gt; [[HieAST Type]] -&gt; [[HieAST Type]]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[[HieAST Type]] -&gt; [[HieAST Type]]
</span><a href="#local-6989586621680999012"><span class="hs-identifier hs-var">mergePairs</span></a></span><span> </span><span class="annot"><span class="annottext">[[HieAST Type]]
</span><a href="#local-6989586621680999008"><span class="hs-identifier hs-var">xss</span></a></span><span>
</span><span id="line-515"></span><span>
</span><span id="line-516"></span><span id="local-6989586621680999829"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#simpleNodeInfo"><span class="hs-identifier hs-type">simpleNodeInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-type">NodeInfo</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999829"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-517"></span><span id="simpleNodeInfo"><span class="annot"><span class="annottext">simpleNodeInfo :: forall a. FastString -&gt; FastString -&gt; NodeInfo a
</span><a href="GHC.Iface.Ext.Utils.html#simpleNodeInfo"><span class="hs-identifier hs-var hs-var">simpleNodeInfo</span></a></span></span><span> </span><span id="local-6989586621680999006"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999006"><span class="hs-identifier hs-var">cons</span></a></span></span><span> </span><span id="local-6989586621680999005"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999005"><span class="hs-identifier hs-var">typ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Set (FastString, FastString)
-&gt; [a] -&gt; NodeIdentifiers a -&gt; NodeInfo a
forall a.
Set (FastString, FastString)
-&gt; [a] -&gt; NodeIdentifiers a -&gt; NodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-var">NodeInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FastString, FastString) -&gt; Set (FastString, FastString)
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">S.singleton</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999006"><span class="hs-identifier hs-var">cons</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680999005"><span class="hs-identifier hs-var">typ</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">NodeIdentifiers a
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span>
</span><span id="line-518"></span><span>
</span><span id="line-519"></span><span id="local-6989586621680999825"><span id="local-6989586621680999826"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#locOnly"><span class="hs-identifier hs-type">locOnly</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999826"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeOrigin"><span class="hs-identifier hs-type">NodeOrigin</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999826"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999825"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-520"></span><span id="locOnly"><span class="annot"><span class="annottext">locOnly :: forall (m :: * -&gt; *) a.
Monad m =&gt;
SrcSpan -&gt; ReaderT NodeOrigin m [HieAST a]
</span><a href="GHC.Iface.Ext.Utils.html#locOnly"><span class="hs-identifier hs-var hs-var">locOnly</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span id="local-6989586621680998993"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998993"><span class="hs-identifier hs-var">span</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-521"></span><span>  </span><span id="local-6989586621680998992"><span class="annot"><span class="annottext">NodeOrigin
</span><a href="#local-6989586621680998992"><span class="hs-identifier hs-var">org</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReaderT NodeOrigin m NodeOrigin
forall (m :: * -&gt; *) r. Monad m =&gt; ReaderT r m r
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-522"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680998990"><span class="annot"><span class="annottext">e :: SourcedNodeInfo a
</span><a href="#local-6989586621680998990"><span class="hs-identifier hs-var hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NodeOrigin -&gt; NodeInfo a -&gt; SourcedNodeInfo a
forall a. NodeOrigin -&gt; NodeInfo a -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Utils.html#mkSourcedNodeInfo"><span class="hs-identifier hs-var">mkSourcedNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">NodeOrigin
</span><a href="#local-6989586621680998992"><span class="hs-identifier hs-var">org</span></a></span><span> </span><span class="annot"><span class="annottext">(NodeInfo a -&gt; SourcedNodeInfo a)
-&gt; NodeInfo a -&gt; SourcedNodeInfo a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">NodeInfo a
forall a. NodeInfo a
</span><a href="GHC.Iface.Ext.Utils.html#emptyNodeInfo"><span class="hs-identifier hs-var">emptyNodeInfo</span></a></span><span>
</span><span id="line-523"></span><span>  </span><span class="annot"><span class="annottext">[HieAST a] -&gt; ReaderT NodeOrigin m [HieAST a]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">SourcedNodeInfo a -&gt; Span -&gt; [HieAST a] -&gt; HieAST a
forall a. SourcedNodeInfo a -&gt; Span -&gt; [HieAST a] -&gt; HieAST a
</span><a href="GHC.Iface.Ext.Types.html#Node"><span class="hs-identifier hs-var">Node</span></a></span><span> </span><span class="annot"><span class="annottext">SourcedNodeInfo a
forall {a}. SourcedNodeInfo a
</span><a href="#local-6989586621680998990"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998993"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-524"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#locOnly"><span class="hs-identifier hs-var">locOnly</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[HieAST a] -&gt; ReaderT NodeOrigin m [HieAST a]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-525"></span><span>
</span><span id="line-526"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#mkScope"><span class="hs-identifier hs-type">mkScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Scope"><span class="hs-identifier hs-type">Scope</span></a></span><span>
</span><span id="line-527"></span><span id="mkScope"><span class="annot"><span class="annottext">mkScope :: SrcSpan -&gt; Scope
</span><a href="GHC.Iface.Ext.Utils.html#mkScope"><span class="hs-identifier hs-var hs-var">mkScope</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span id="local-6989586621680998987"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998987"><span class="hs-identifier hs-var">sp</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Span -&gt; Scope
</span><a href="GHC.Iface.Ext.Types.html#LocalScope"><span class="hs-identifier hs-var">LocalScope</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998987"><span class="hs-identifier hs-var">sp</span></a></span><span>
</span><span id="line-528"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#mkScope"><span class="hs-identifier hs-var">mkScope</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#NoScope"><span class="hs-identifier hs-var">NoScope</span></a></span><span>
</span><span id="line-529"></span><span>
</span><span id="line-530"></span><span id="local-6989586621680999813"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#mkLScope"><span class="hs-identifier hs-type">mkLScope</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#Located"><span class="hs-identifier hs-type">Located</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999813"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Scope"><span class="hs-identifier hs-type">Scope</span></a></span></span><span>
</span><span id="line-531"></span><span id="mkLScope"><span class="annot"><span class="annottext">mkLScope :: forall a. Located a -&gt; Scope
</span><a href="GHC.Iface.Ext.Utils.html#mkLScope"><span class="hs-identifier hs-var hs-var">mkLScope</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; Scope
</span><a href="GHC.Iface.Ext.Utils.html#mkScope"><span class="hs-identifier hs-var">mkScope</span></a></span><span> </span><span class="annot"><span class="annottext">(SrcSpan -&gt; Scope)
-&gt; (GenLocated SrcSpan a -&gt; SrcSpan)
-&gt; GenLocated SrcSpan a
-&gt; Scope
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">GenLocated SrcSpan a -&gt; SrcSpan
forall l e. GenLocated l e -&gt; l
</span><a href="GHC.Types.SrcLoc.html#getLoc"><span class="hs-identifier hs-var">getLoc</span></a></span><span>
</span><span id="line-532"></span><span>
</span><span id="line-533"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#combineScopes"><span class="hs-identifier hs-type">combineScopes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Scope"><span class="hs-identifier hs-type">Scope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Scope"><span class="hs-identifier hs-type">Scope</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#Scope"><span class="hs-identifier hs-type">Scope</span></a></span><span>
</span><span id="line-534"></span><span id="combineScopes"><span class="annot"><span class="annottext">combineScopes :: Scope -&gt; Scope -&gt; Scope
</span><a href="GHC.Iface.Ext.Utils.html#combineScopes"><span class="hs-identifier hs-var hs-var">combineScopes</span></a></span></span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#ModuleScope"><span class="hs-identifier hs-var">ModuleScope</span></a></span><span> </span><span class="annot"><span class="annottext">Scope
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#ModuleScope"><span class="hs-identifier hs-var">ModuleScope</span></a></span><span>
</span><span id="line-535"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#combineScopes"><span class="hs-identifier hs-var">combineScopes</span></a></span><span> </span><span class="annot"><span class="annottext">Scope
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#ModuleScope"><span class="hs-identifier hs-var">ModuleScope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#ModuleScope"><span class="hs-identifier hs-var">ModuleScope</span></a></span><span>
</span><span id="line-536"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#combineScopes"><span class="hs-identifier hs-var">combineScopes</span></a></span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#NoScope"><span class="hs-identifier hs-var">NoScope</span></a></span><span> </span><span id="local-6989586621680998983"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680998983"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680998983"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-537"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#combineScopes"><span class="hs-identifier hs-var">combineScopes</span></a></span><span> </span><span id="local-6989586621680998982"><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680998982"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="GHC.Iface.Ext.Types.html#NoScope"><span class="hs-identifier hs-var">NoScope</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Scope
</span><a href="#local-6989586621680998982"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-538"></span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#combineScopes"><span class="hs-identifier hs-var">combineScopes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#LocalScope"><span class="hs-identifier hs-type">LocalScope</span></a></span><span> </span><span id="local-6989586621680998981"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998981"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#LocalScope"><span class="hs-identifier hs-type">LocalScope</span></a></span><span> </span><span id="local-6989586621680998980"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998980"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-539"></span><span>  </span><span class="annot"><span class="annottext">SrcSpan -&gt; Scope
</span><a href="GHC.Iface.Ext.Utils.html#mkScope"><span class="hs-identifier hs-var">mkScope</span></a></span><span> </span><span class="annot"><span class="annottext">(SrcSpan -&gt; Scope) -&gt; SrcSpan -&gt; Scope
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SrcSpan -&gt; SrcSpan -&gt; SrcSpan
</span><a href="GHC.Types.SrcLoc.html#combineSrcSpans"><span class="hs-identifier hs-var">combineSrcSpans</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; Maybe BufSpan -&gt; SrcSpan
</span><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-var">RealSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998981"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Span -&gt; Maybe BufSpan -&gt; SrcSpan
</span><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-var">RealSrcSpan</span></a></span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998980"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-540"></span><span>
</span><span id="line-541"></span><span id="local-6989586621680999814"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#mkSourcedNodeInfo"><span class="hs-identifier hs-type">mkSourcedNodeInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeOrigin"><span class="hs-identifier hs-type">NodeOrigin</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-type">NodeInfo</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999814"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#SourcedNodeInfo"><span class="hs-identifier hs-type">SourcedNodeInfo</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999814"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-542"></span><span id="mkSourcedNodeInfo"><span class="annot"><span class="annottext">mkSourcedNodeInfo :: forall a. NodeOrigin -&gt; NodeInfo a -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Utils.html#mkSourcedNodeInfo"><span class="hs-identifier hs-var hs-var">mkSourcedNodeInfo</span></a></span></span><span> </span><span id="local-6989586621680998978"><span class="annot"><span class="annottext">NodeOrigin
</span><a href="#local-6989586621680998978"><span class="hs-identifier hs-var">org</span></a></span></span><span> </span><span id="local-6989586621680998977"><span class="annot"><span class="annottext">NodeInfo a
</span><a href="#local-6989586621680998977"><span class="hs-identifier hs-var">ni</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map NodeOrigin (NodeInfo a) -&gt; SourcedNodeInfo a
forall a. Map NodeOrigin (NodeInfo a) -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#SourcedNodeInfo"><span class="hs-identifier hs-var">SourcedNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">(Map NodeOrigin (NodeInfo a) -&gt; SourcedNodeInfo a)
-&gt; Map NodeOrigin (NodeInfo a) -&gt; SourcedNodeInfo a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">NodeOrigin -&gt; NodeInfo a -&gt; Map NodeOrigin (NodeInfo a)
forall k a. k -&gt; a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#singleton"><span class="hs-identifier hs-var">M.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">NodeOrigin
</span><a href="#local-6989586621680998978"><span class="hs-identifier hs-var">org</span></a></span><span> </span><span class="annot"><span class="annottext">NodeInfo a
</span><a href="#local-6989586621680998977"><span class="hs-identifier hs-var">ni</span></a></span><span>
</span><span id="line-543"></span><span>
</span><span id="line-544"></span><span class="hs-pragma">{-# INLINEABLE</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#makeNode"><span class="hs-pragma hs-type">makeNode</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-545"></span><span id="local-6989586621680999802"><span id="local-6989586621680999803"><span id="local-6989586621680999804"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#makeNode"><span class="hs-identifier hs-type">makeNode</span></a></span><span>
</span><span id="line-546"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999804"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999803"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-547"></span><span>  </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680999803"><span class="hs-identifier hs-type">a</span></a></span><span>                       </span><span class="hs-comment">-- ^ helps fill in 'nodeAnnotations' (with 'Data')</span><span>
</span><span id="line-548"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span>                 </span><span class="hs-comment">-- ^ return an empty list if this is unhelpful</span><span>
</span><span id="line-549"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeOrigin"><span class="hs-identifier hs-type">NodeOrigin</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999804"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999802"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">]</span></span></span></span><span>
</span><span id="line-550"></span><span id="makeNode"><span class="annot"><span class="annottext">makeNode :: forall (m :: * -&gt; *) a b.
(Monad m, Data a) =&gt;
a -&gt; SrcSpan -&gt; ReaderT NodeOrigin m [HieAST b]
</span><a href="GHC.Iface.Ext.Utils.html#makeNode"><span class="hs-identifier hs-var hs-var">makeNode</span></a></span></span><span> </span><span id="local-6989586621680998966"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680998966"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621680998965"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680998965"><span class="hs-identifier hs-var">spn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-551"></span><span>  </span><span id="local-6989586621680998964"><span class="annot"><span class="annottext">NodeOrigin
</span><a href="#local-6989586621680998964"><span class="hs-identifier hs-var">org</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReaderT NodeOrigin m NodeOrigin
forall (m :: * -&gt; *) r. Monad m =&gt; ReaderT r m r
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-552"></span><span>  </span><span class="annot"><span class="annottext">[HieAST b] -&gt; ReaderT NodeOrigin m [HieAST b]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">([HieAST b] -&gt; ReaderT NodeOrigin m [HieAST b])
-&gt; [HieAST b] -&gt; ReaderT NodeOrigin m [HieAST b]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680998965"><span class="hs-identifier hs-var">spn</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-553"></span><span>    </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span id="local-6989586621680998963"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998963"><span class="hs-identifier hs-var">span</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">SourcedNodeInfo b -&gt; Span -&gt; [HieAST b] -&gt; HieAST b
forall a. SourcedNodeInfo a -&gt; Span -&gt; [HieAST a] -&gt; HieAST a
</span><a href="GHC.Iface.Ext.Types.html#Node"><span class="hs-identifier hs-var">Node</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NodeOrigin -&gt; NodeInfo b -&gt; SourcedNodeInfo b
forall a. NodeOrigin -&gt; NodeInfo a -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Utils.html#mkSourcedNodeInfo"><span class="hs-identifier hs-var">mkSourcedNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">NodeOrigin
</span><a href="#local-6989586621680998964"><span class="hs-identifier hs-var">org</span></a></span><span> </span><span class="annot"><span class="annottext">(NodeInfo b -&gt; SourcedNodeInfo b)
-&gt; NodeInfo b -&gt; SourcedNodeInfo b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; NodeInfo b
forall a. FastString -&gt; FastString -&gt; NodeInfo a
</span><a href="GHC.Iface.Ext.Utils.html#simpleNodeInfo"><span class="hs-identifier hs-var">simpleNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680998962"><span class="hs-identifier hs-var">cons</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680998961"><span class="hs-identifier hs-var">typ</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998963"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-554"></span><span>    </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-555"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-556"></span><span>    </span><span id="local-6989586621680998962"><span class="annot"><span class="annottext">cons :: FastString
</span><a href="#local-6989586621680998962"><span class="hs-identifier hs-var hs-var">cons</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#mkFastString"><span class="hs-identifier hs-var">mkFastString</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; FastString) -&gt; (a -&gt; String) -&gt; a -&gt; FastString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Constr -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">(Constr -&gt; String) -&gt; (a -&gt; Constr) -&gt; a -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Constr
forall a. Data a =&gt; a -&gt; Constr
</span><a href="../../base/src/Data.Data.html#toConstr"><span class="hs-identifier hs-var">toConstr</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; FastString) -&gt; a -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680998966"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-557"></span><span>    </span><span id="local-6989586621680998961"><span class="annot"><span class="annottext">typ :: FastString
</span><a href="#local-6989586621680998961"><span class="hs-identifier hs-var hs-var">typ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#mkFastString"><span class="hs-identifier hs-var">mkFastString</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; FastString) -&gt; (a -&gt; String) -&gt; a -&gt; FastString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; String) -&gt; (a -&gt; TyCon) -&gt; a -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">TypeRep -&gt; TyCon
</span><a href="../../base/src/Data.Typeable.html#typeRepTyCon"><span class="hs-identifier hs-var">typeRepTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">(TypeRep -&gt; TyCon) -&gt; (a -&gt; TypeRep) -&gt; a -&gt; TyCon
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; TypeRep
forall a. Typeable a =&gt; a -&gt; TypeRep
</span><a href="../../base/src/Data.Typeable.html#typeOf"><span class="hs-identifier hs-var">typeOf</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; FastString) -&gt; a -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680998966"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-558"></span><span>
</span><span id="line-559"></span><span class="hs-pragma">{-# INLINEABLE</span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Utils.html#makeTypeNode"><span class="hs-pragma hs-type">makeTypeNode</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-560"></span><span id="local-6989586621680999792"><span id="local-6989586621680999793"><span class="annot"><a href="GHC.Iface.Ext.Utils.html#makeTypeNode"><span class="hs-identifier hs-type">makeTypeNode</span></a></span><span>
</span><span id="line-561"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999793"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-type">Data</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999792"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-562"></span><span>  </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621680999792"><span class="hs-identifier hs-type">a</span></a></span><span>                       </span><span class="hs-comment">-- ^ helps fill in 'nodeAnnotations' (with 'Data')</span><span>
</span><span id="line-563"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.SrcLoc.html#SrcSpan"><span class="hs-identifier hs-type">SrcSpan</span></a></span><span>                 </span><span class="hs-comment">-- ^ return an empty list if this is unhelpful</span><span>
</span><span id="line-564"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span>                    </span><span class="hs-comment">-- ^ type to associate with the node</span><span>
</span><span id="line-565"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Ext.Types.html#NodeOrigin"><span class="hs-identifier hs-type">NodeOrigin</span></a></span><span> </span><span class="annot"><a href="#local-6989586621680999793"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Ext.Types.html#HieAST"><span class="hs-identifier hs-type">HieAST</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span></span></span><span>
</span><span id="line-566"></span><span id="makeTypeNode"><span class="annot"><span class="annottext">makeTypeNode :: forall (m :: * -&gt; *) a.
(Monad m, Data a) =&gt;
a -&gt; SrcSpan -&gt; Type -&gt; ReaderT NodeOrigin m [HieAST Type]
</span><a href="GHC.Iface.Ext.Utils.html#makeTypeNode"><span class="hs-identifier hs-var hs-var">makeTypeNode</span></a></span></span><span> </span><span id="local-6989586621680998945"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680998945"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621680998944"><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680998944"><span class="hs-identifier hs-var">spn</span></a></span></span><span> </span><span id="local-6989586621680998943"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680998943"><span class="hs-identifier hs-var">etyp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-567"></span><span>  </span><span id="local-6989586621680998942"><span class="annot"><span class="annottext">NodeOrigin
</span><a href="#local-6989586621680998942"><span class="hs-identifier hs-var">org</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReaderT NodeOrigin m NodeOrigin
forall (m :: * -&gt; *) r. Monad m =&gt; ReaderT r m r
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-568"></span><span>  </span><span class="annot"><span class="annottext">[HieAST Type] -&gt; ReaderT NodeOrigin m [HieAST Type]
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="annot"><span class="annottext">([HieAST Type] -&gt; ReaderT NodeOrigin m [HieAST Type])
-&gt; [HieAST Type] -&gt; ReaderT NodeOrigin m [HieAST Type]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SrcSpan
</span><a href="#local-6989586621680998944"><span class="hs-identifier hs-var">spn</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-569"></span><span>    </span><span class="annot"><a href="GHC.Types.SrcLoc.html#RealSrcSpan"><span class="hs-identifier hs-type">RealSrcSpan</span></a></span><span> </span><span id="local-6989586621680998941"><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998941"><span class="hs-identifier hs-var">span</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe BufSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-570"></span><span>      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">SourcedNodeInfo Type -&gt; Span -&gt; [HieAST Type] -&gt; HieAST Type
forall a. SourcedNodeInfo a -&gt; Span -&gt; [HieAST a] -&gt; HieAST a
</span><a href="GHC.Iface.Ext.Types.html#Node"><span class="hs-identifier hs-var">Node</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NodeOrigin -&gt; NodeInfo Type -&gt; SourcedNodeInfo Type
forall a. NodeOrigin -&gt; NodeInfo a -&gt; SourcedNodeInfo a
</span><a href="GHC.Iface.Ext.Utils.html#mkSourcedNodeInfo"><span class="hs-identifier hs-var">mkSourcedNodeInfo</span></a></span><span> </span><span class="annot"><span class="annottext">NodeOrigin
</span><a href="#local-6989586621680998942"><span class="hs-identifier hs-var">org</span></a></span><span> </span><span class="annot"><span class="annottext">(NodeInfo Type -&gt; SourcedNodeInfo Type)
-&gt; NodeInfo Type -&gt; SourcedNodeInfo Type
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Set (FastString, FastString)
-&gt; [Type] -&gt; NodeIdentifiers Type -&gt; NodeInfo Type
forall a.
Set (FastString, FastString)
-&gt; [a] -&gt; NodeIdentifiers a -&gt; NodeInfo a
</span><a href="GHC.Iface.Ext.Types.html#NodeInfo"><span class="hs-identifier hs-var">NodeInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FastString, FastString) -&gt; Set (FastString, FastString)
forall a. a -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#singleton"><span class="hs-identifier hs-var">S.singleton</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680998940"><span class="hs-identifier hs-var">cons</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680998939"><span class="hs-identifier hs-var">typ</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680998943"><span class="hs-identifier hs-var">etyp</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">NodeIdentifiers Type
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">M.empty</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Span
</span><a href="#local-6989586621680998941"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-571"></span><span>    </span><span class="annot"><span class="annottext">SrcSpan
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-572"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-573"></span><span>    </span><span id="local-6989586621680998940"><span class="annot"><span class="annottext">cons :: FastString
</span><a href="#local-6989586621680998940"><span class="hs-identifier hs-var hs-var">cons</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#mkFastString"><span class="hs-identifier hs-var">mkFastString</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; FastString) -&gt; (a -&gt; String) -&gt; a -&gt; FastString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Constr -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">(Constr -&gt; String) -&gt; (a -&gt; Constr) -&gt; a -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Constr
forall a. Data a =&gt; a -&gt; Constr
</span><a href="../../base/src/Data.Data.html#toConstr"><span class="hs-identifier hs-var">toConstr</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; FastString) -&gt; a -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680998945"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-574"></span><span>    </span><span id="local-6989586621680998939"><span class="annot"><span class="annottext">typ :: FastString
</span><a href="#local-6989586621680998939"><span class="hs-identifier hs-var hs-var">typ</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#mkFastString"><span class="hs-identifier hs-var">mkFastString</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; FastString) -&gt; (a -&gt; String) -&gt; a -&gt; FastString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; String) -&gt; (a -&gt; TyCon) -&gt; a -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">TypeRep -&gt; TyCon
</span><a href="../../base/src/Data.Typeable.html#typeRepTyCon"><span class="hs-identifier hs-var">typeRepTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">(TypeRep -&gt; TyCon) -&gt; (a -&gt; TypeRep) -&gt; a -&gt; TyCon
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; TypeRep
forall a. Typeable a =&gt; a -&gt; TypeRep
</span><a href="../../base/src/Data.Typeable.html#typeOf"><span class="hs-identifier hs-var">typeOf</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; FastString) -&gt; a -&gt; FastString
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680998945"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-575"></span></pre></body></html>